






#import "UnlikelyEnsureCell.h"
#import "SleetHexDustInfo.h"
#import "Masonry.h"
#import "UIColor+PubColor.h"

@implementation UnlikelyEnsureCell

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

- (void)setModel:(SleetHexDustInfo *)model
{
    _model = model;
    _webpageLabel.text = model.pintEnvelope;
    _webpageLabel.font = [UIFont systemFontOfSize:model.relationScannedLostVideoWorkDefault];
    _webpageLabel.textColor = [UIColor roundSoloistSpectralLookupCopyrightSuggested:model.collisionSubfamilyArrowArmTrapComment];
    self.backgroundColor = [[UIColor roundSoloistSpectralLookupCopyrightSuggested:model.sexPositionSuperiorsEnablingPeriodSugar] colorWithAlphaComponent:model.promiseComposerAddAgeAudibleElements];
    self.layer.cornerRadius = 2;
}

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

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

@end
