//
//  XVOrderSettiingTitleView.m
//  fastservice
//
//  Created by xuning on 2/26/24.
//  Copyright © 2024 FastService. All rights reserved.
//

#import "XVOrderSettiingTitleView.h"

@interface XVOrderSettiingTitleView()

@property (nonatomic, strong) UILabel *titleLabel;

@property (nonatomic, strong) UIView *lineView;


@end

@implementation XVOrderSettiingTitleView

- (instancetype)initWithTitle:(NSString *)title {
    if(self = [super init]) {
        self.backgroundColor = [UIColor whiteColor];
        self.titleLabel.text = title;
        [self addSubview:self.titleLabel];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self).mas_offset(13);
            make.left.mas_equalTo(self).mas_offset(15);
        }];
        
        [self addSubview:self.lineView];
        [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(self);
            make.left.mas_equalTo(self).mas_offset(15);
            make.right.mas_equalTo(self).mas_offset(-15);
            make.height.mas_equalTo(1);
        }];
        
    }
    return self;
}

- (UILabel *)titleLabel {
    if(_titleLabel == nil) {
        _titleLabel = [[UILabel alloc]initWithText:@"标题" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:16];
    }
    return _titleLabel;
}
- (UIView *)lineView {
    if(_lineView == nil) {
        _lineView = [[UIView alloc]init];
        _lineView.backgroundColor = F7_3_COLOR;
    }
    return _lineView;
}
@end
