//
//  BottomThirdView.m
//  ATAuthSceneDemo
//
//  Created by njbjy on 2025/7/17.
//  Copyright © 2025 刘超的MacBook. All rights reserved.
//

#import "BottomThirdView.h"

@interface BottomThirdView()

@property (weak, nonatomic) IBOutlet UIButton *wechatLoginBtn;
@property (weak, nonatomic) IBOutlet UIButton *smsLoginBtn;
@property (weak, nonatomic) IBOutlet UIButton *passwordLoginBtn;

@end

@implementation BottomThirdView

static BottomThirdView *thirdView = nil;

+ (id)shareThirdView {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        thirdView = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] lastObject];
    });
    return thirdView;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.wechatLoginBtn setBackgroundImage:[UIImage imageNamed:@"wechat_login_icon"] forState:(UIControlStateNormal)];
    [self.smsLoginBtn setBackgroundImage:[UIImage imageNamed:@"smscode_login_icon"] forState:(UIControlStateNormal)];
    [self.passwordLoginBtn setBackgroundImage:[UIImage imageNamed:@"password_login_icon"] forState:(UIControlStateNormal)];
}


- (IBAction)wechatAction:(id)sender {
    if (self.wechatActionBlock) {
        self.wechatActionBlock();
    }
}


- (IBAction)smsAction:(id)sender {
    if (self.smsActionBlock) {
        self.smsActionBlock();
    }
}

- (IBAction)passwordAction:(id)sender {
    if (self.passwordActionBlock) {
        self.passwordActionBlock();
    }
}

@end
