






#import "AudioLayerSideCell.h"
#import "CallSeleniumInfo.h"
#import "Masonry.h"
#import "UIColor+DryColor.h"

@implementation AudioLayerSideCell

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

- (void)setModel:(CallSeleniumInfo *)model
{
    _model = model;
    _scannerLabel.text = model.operationHex;
    _scannerLabel.font = [UIFont systemFontOfSize:model.clampBlindingDeriveCapsGeneralRotating];
    _scannerLabel.textColor = [UIColor formattedParameterBlockEmailEstablishAnonymous:model.equalAssistantDocumentsTempDayAsk];
    self.backgroundColor = [[UIColor formattedParameterBlockEmailEstablishAnonymous:model.breakKeyboardCompoundBadTildeStacked] colorWithAlphaComponent:model.spineReadSensorStatementLinearPrice];
    self.layer.cornerRadius = 2;
}

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

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

@end
