






#import "FitBleedPutLowCell.h"
#import "TailPubSplatInfo.h"
#import "Masonry.h"
#import "UIColor+SubColor.h"

@implementation FitBleedPutLowCell

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

- (void)setModel:(TailPubSplatInfo *)model
{
    _model = model;
    _flushedLabel.text = model.whoTargetLaw;
    _flushedLabel.font = [UIFont systemFontOfSize:model.cleanupEligibleHeadBuddyIllDesktop];
    _flushedLabel.textColor = [UIColor drawDownloadsSensorRatioSurrogateSob:model.hertzPassLeftPinkUpsideHourly];
    self.backgroundColor = [[UIColor drawDownloadsSensorRatioSurrogateSob:model.traitFirstLogBackBusHalf] colorWithAlphaComponent:model.recentlyBandRetYahooRestEnhanced];
    self.layer.cornerRadius = 2;
}

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

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

@end
