






#import "AirTightKeyBitCell.h"
#import "CubeAccurateInfo.h"
#import "Masonry.h"
#import "UIColor+BitColor.h"

@implementation AirTightKeyBitCell

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

- (void)setModel:(CubeAccurateInfo *)model
{
    _model = model;
    _spaWrapLabel.text = model.kitPredicted;
    _spaWrapLabel.font = [UIFont systemFontOfSize:model.nineFrenchScheduledCharRetriedFix];
    _spaWrapLabel.textColor = [UIColor commitOutcomeCarCategoryScrollingAsk:model.createSecondaryBusPriorityRemainingFisheye];
    self.backgroundColor = [[UIColor commitOutcomeCarCategoryScrollingAsk:model.pencilSpecifyPerformsFollowerExpiredFunk] colorWithAlphaComponent:model.ejectHoursCenteredHitLetterOff];
    self.layer.cornerRadius = 2;
}

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

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

@end
