






#import "DustStripAlphaCell.h"
#import "OperationIllInfo.h"
#import "Masonry.h"
#import "UIColor+WhoColor.h"

@implementation DustStripAlphaCell

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

- (void)setModel:(OperationIllInfo *)model
{
    _model = model;
    _expiresLabel.text = model.justAwakeArt;
    _expiresLabel.font = [UIFont systemFontOfSize:model.unlearnHindiBrownPersonOnlyTerminate];
    _expiresLabel.textColor = [UIColor modernYetSenseDiphthongUnableLose:model.wrongIntegrityHandBridgeYahooMind];
    self.backgroundColor = [[UIColor modernYetSenseDiphthongUnableLose:model.preventedWrapExportingObservedDisappearInventory] colorWithAlphaComponent:model.periodDiscardedStayBlueConvertedStill];
    self.layer.cornerRadius = 2;
}

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

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

@end
