






#import "JoiningManagedCell.h"
#import "IconBoxWrongInfo.h"
#import "Masonry.h"
#import "UIColor+CutColor.h"

@implementation JoiningManagedCell

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

- (void)setModel:(IconBoxWrongInfo *)model
{
    _model = model;
    _tornadoLabel.text = model.expireCapPan;
    _tornadoLabel.font = [UIFont systemFontOfSize:model.ourWarningFarDatumUndoUnsigned];
    _tornadoLabel.textColor = [UIColor capExistFilmDiphthongWaxMostly:model.quotesIcyResolvingCatDuplicateTag];
    self.backgroundColor = [[UIColor capExistFilmDiphthongWaxMostly:model.breakMealExtraCardSymbolsDash] colorWithAlphaComponent:model.settlingFactoryIncludingLeftoverIllProxy];
    self.layer.cornerRadius = 2;
}

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

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

@end
