






#import "VisualRankBondCell.h"
#import "ConsumerFiveInfo.h"
#import "Masonry.h"
#import "UIColor+BadColor.h"

@implementation VisualRankBondCell

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

- (void)setModel:(ConsumerFiveInfo *)model
{
    _model = model;
    _overlapLabel.text = model.cursorsShare;
    _overlapLabel.font = [UIFont systemFontOfSize:model.terminateResumeResolvingPathBlueSliding];
    _overlapLabel.textColor = [UIColor tightVitaminLowStyleUpscaleCountry:model.collapsesPunjabiRowEscapesRetConvert];
    self.backgroundColor = [[UIColor tightVitaminLowStyleUpscaleCountry:model.localeCycleStatementVolumeFooterSquared] colorWithAlphaComponent:model.bendSilentBracketPlainUndoneSurface];
    self.layer.cornerRadius = 2;
}

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

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

@end
