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

#import "XVGetOrderAlterSliderView.h"
#import "HBLockSliderView.h"

@interface XVGetOrderAlterSliderView()<HBLockSliderDelegate>
// 拒绝
@property (nonatomic, strong) UIButton *refuseButton;

// 滑动
@property (nonatomic, strong) HBLockSliderView *sliderView;
@end

@implementation XVGetOrderAlterSliderView

- (instancetype)initWithFrame:(CGRect)frame {
    if(self = [super initWithFrame:frame]) {
        [self addSubview:self.refuseButton];
        self.refuseButton.frame = CGRectMake(0, 0, 84, 51);
        [self addSubview:self.sliderView];
    }
    return self;
}

- (UIButton *)refuseButton {
    if(_refuseButton == nil) {
        _refuseButton = [[UIButton alloc]initWithTitle:@"拒绝" fontSize:14 titleColor:F_101010_COLOR bgColor:[UIColor colorWithHexString:@"#E4E1E1"]];
    }
    return _refuseButton;
}
- (HBLockSliderView *)sliderView {
    if (_sliderView == nil) {
        _sliderView = [[HBLockSliderView alloc] initWithFrame:CGRectMake(84, 0, SCREEN_WIDTH-100, 51)];
        _sliderView.text = @"滑动接受派单";
        [_sliderView setColorForBackgroud:COLOR_THEMEGRENN
                               foreground:COLOR_THEMEGRENN
                                    thumb:COLOR_THEMEGRENN
                                   border:[UIColor clearColor]
                                textColor:[UIColor whiteColor]];
        _sliderView.thumbBack = YES;
        [_sliderView setThumbBeginImage:[UIImage imageNamed:@"huadong"] finishImage:[UIImage imageNamed:@"huadong"]];
        [_sliderView setRoundCorners:0];
        _sliderView.delegate = self;
        
    }
    return _sliderView;
}
@end
