






#import "ReaderTriggersCell.h"
#import "DayExclusionInfo.h"
#import "Masonry.h"
#import "UIColor+HasColor.h"

@implementation ReaderTriggersCell

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

- (void)setModel:(DayExclusionInfo *)model
{
    _model = model;
    _fatCertLabel.text = model.surgeGramCup;
    _fatCertLabel.font = [UIFont systemFontOfSize:model.noneAscendingQuitFocalBlueIcon];
    _fatCertLabel.textColor = [UIColor muteNominallyIncreaseAnchorsFatSnap:model.positionsMegawattsDogPublishOpaqueSeconds];
    self.backgroundColor = [[UIColor muteNominallyIncreaseAnchorsFatSnap:model.fastProvinceLawCleanDecreaseNotice] colorWithAlphaComponent:model.infinityVisionConsumerNotEndTag];
    self.layer.cornerRadius = 2;
}

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

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

@end
