






#import "MenuMindWasFaxCell.h"
#import "EggApplyBikeInfo.h"
#import "Masonry.h"
#import "UIColor+WhoColor.h"

@implementation MenuMindWasFaxCell

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

- (void)setModel:(EggApplyBikeInfo *)model
{
    _model = model;
    _tabFlagLabel.text = model.defaultChunk;
    _tabFlagLabel.font = [UIFont systemFontOfSize:model.explicitSerializeExistentSinSpaBrief];
    _tabFlagLabel.textColor = [UIColor boundaryDivideHandlesBankGopherEnvelope:model.pubOccurredExponentsDescribeOffTaps];
    self.backgroundColor = [[UIColor boundaryDivideHandlesBankGopherEnvelope:model.featuresBeginningActiveOrderForwardsRestoring] colorWithAlphaComponent:model.immediateLineTheRegistryZipLoss];
    self.layer.cornerRadius = 2;
}

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

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

@end
