//
//  GMWoikingTableCollectionCell.m
//  Gengmei
//
//  Created by Jessica on 2020/2/18.
//  Copyright © 2020 更美互动信息科技有限公司. All rights reserved.
//

#import "GMWoikingTableCollectionCell.h"
@import Masonry;
@import GMBase;
@implementation GMWoikingTableCollectionCell
- (void)setup {
    [super setup];
    _icon = [[GMImageView alloc] init];
    _icon.image = [UIImage imageNamed:@"welfare_new_fenqi"];
    [self addSubview:_icon];
    [_icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0);
        make.centerX.mas_equalTo(0);
        make.size.mas_equalTo(CGSizeMake(45, 45));
    }];
    
    _infoLabel = [GMLabel labelWithTextColor:RGBCOLOR_HEX(0x464646) fontSize:14];
    _infoLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:_infoLabel];
    [_infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(_icon.mas_centerX);
        make.top.equalTo(_icon.mas_bottom).offset(8);
        make.height.mas_equalTo(15);
    }];
    
    _badge = [GMLabel labelWithTextColor:UIColor.whiteColor fontSize:11];
    _badge.textAlignment = NSTextAlignmentCenter;
    _badge.layer.masksToBounds = YES;
    _badge.layer.cornerRadius = 8;
    _badge.backgroundColor = RGBCOLOR_HEX(0xFF4F5F);
    [self addSubview:_badge];
    [_badge mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_icon.mas_top);
        make.right.mas_equalTo(_icon.mas_right);
        make.size.mas_equalTo(CGSizeMake(16, 16));
    }];
}

@end
