






#import "LostCornerMenuCell.h"
#import "OneVariationInfo.h"
#import "Masonry.h"
#import "UIColor+DryColor.h"

@implementation LostCornerMenuCell

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

- (void)setModel:(OneVariationInfo *)model
{
    _model = model;
    _bridgedLabel.text = model.packetPublic;
    _bridgedLabel.font = [UIFont systemFontOfSize:model.substringInvitedKeyMaxSonResults];
    _bridgedLabel.textColor = [UIColor earStartDiscardsPairDirtyGlyph:model.underlineErrorPaceAperturePriorityEndpoints];
    self.backgroundColor = [[UIColor earStartDiscardsPairDirtyGlyph:model.expiredSinkSelfParallelUnpluggedScheme] colorWithAlphaComponent:model.contextsHailStackViolationFocalCollected];
    self.layer.cornerRadius = 2;
}

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

@end
