//
//  SMClientDetailCell.m
//  SkinMagnifier
//
//  Created by nana on 2020/12/4.
//

#import "SMClientDetailCell.h"


@interface SMClientDetailCell()


@end

@implementation SMClientDetailCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    return  self;
}

- (void)setupUI {
    UIImageView *timeIconImageView = [[UIImageView alloc] init];
    timeIconImageView.image = [UIImage imageNamed:@"client_time_bg"];
    [self.contentView addSubview:timeIconImageView];
    [timeIconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(14.5);
        make.top.mas_equalTo(21);
        make.bottom.mas_equalTo(-21);
        make.size.mas_equalTo(CGSizeMake(34, 34));
    }];
    
    self.timeLabel = [[UILabel alloc] init];
    self.timeLabel.attributedText = createAttString(@"2020/05/20 15:23:03 ", 14, rgba(76, 74, 66, 1));
    [self.contentView addSubview:self.timeLabel];
    [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(timeIconImageView.mas_right).offset(14.5);
        make.centerY.equalTo(timeIconImageView);
    }];
    
    self.typeLabel = [[UILabel alloc] init];
    self.typeLabel.attributedText = createAttString(@"鼻子", 14, rgba(76, 74, 66, 1));
    [self.contentView addSubview:self.typeLabel];
    [self.typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-69.5);
        make.centerY.equalTo(timeIconImageView);
    }];
    
    UIImageView *moreImageView = [[UIImageView alloc] init];
    moreImageView.image = [UIImage imageNamed:@"customer_icon_xyb"];
    [self.contentView addSubview:moreImageView];
    [moreImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-16.5);
        make.centerY.equalTo(timeIconImageView);
    }];
    
    UIView *lineView = [[UIView alloc] init];
    lineView.backgroundColor = rgba(229, 229, 229, 1);
    [self.contentView addSubview:lineView];
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(16);
        make.right.mas_equalTo(-16);
        make.bottom.mas_equalTo(0);
        make.height.mas_equalTo(1);
    }];
    
}
@end
