






#import "EarFilmRearTenCell.h"
#import "PedometerSubInfo.h"
#import "Masonry.h"
#import "UIColor+TenColor.h"

@implementation EarFilmRearTenCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor = [UIColor clearColor];
        
        self.clipsToBounds = YES;
        
        [self addSubview:self.swappedLabel];
        
        [self.swappedLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_equalTo(UIEdgeInsetsMake(0, 4, 0, 0));
        }];
        
    }
    return self;
}

- (void)setModel:(PedometerSubInfo *)model
{
    _model = model;
    _swappedLabel.text = model.lowBaselines;
    _swappedLabel.font = [UIFont systemFontOfSize:model.hebrewMinuteBitPlateLoadPartner];
    _swappedLabel.textColor = [UIColor boxBadEditAddressesAdvisedCalories:model.dogFlatChromiumKeepJoinRequire];
    self.backgroundColor = [[UIColor boxBadEditAddressesAdvisedCalories:model.pashtoNineteenSparseSpotlightDominantNecessary] colorWithAlphaComponent:model.yetPanPartlyTrainerColorStepper];
    self.layer.cornerRadius = 2;
}

- (void)embeddingDrawingEncodedNecessaryMin:(void(^)(void))animations completion:(void(^)(BOOL))completion {
    PedometerSubInfo *info = (PedometerSubInfo *)_model;
    if ([info isKindOfClass:[PedometerSubInfo class]] && info.compositeUtilityStableNegateAbove > 0) {
        self.transform = CGAffineTransformMakeTranslation(-info.compositeUtilityStableNegateAbove, 0);
    }
    [super embeddingDrawingEncodedNecessaryMin:animations completion:completion];
}

- (UILabel *)swappedLabel {
    if (!_swappedLabel) {
        _swappedLabel = [[UILabel alloc] init];
        _swappedLabel.backgroundColor = [UIColor clearColor];
        _swappedLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _swappedLabel;
}

@end
