






#import "InstancesPhaseCell.h"
#import "ContentAbortInfo.h"
#import "Masonry.h"
#import "UIColor+AreColor.h"

@implementation InstancesPhaseCell

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

- (void)setModel:(ContentAbortInfo *)model
{
    _model = model;
    _workingLabel.text = model.theLocalPush;
    _workingLabel.font = [UIFont systemFontOfSize:model.notLocatorSendEnablingSynthesisLoad];
    _workingLabel.textColor = [UIColor engravedMeteringExactFolderNepaliSeparate:model.reductionSuperiorsSubStringOneReporting];
    self.backgroundColor = [[UIColor engravedMeteringExactFolderNepaliSeparate:model.footerJoinExpertAskExportFlag] colorWithAlphaComponent:model.magicProvidedCelsiusRedonePlayPressed];
    self.layer.cornerRadius = 2;
}

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

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

@end
