// sign_up_otp_repository.dart
import 'package:flutter/material.dart';
import '../otp/otp_view_model.dart';

class SignUpOtpRepository implements IOtpRepository {
  final String phoneNumber;
  SignUpOtpRepository(this.phoneNumber);

  @override
  Future<void> sendOtp() async {
    debugPrint("[SignUpOtpRepository] Gọi API gửi OTP cho luồng đăng ký");
    // TODO: call API real
    await Future.delayed(const Duration(seconds: 1));
  }

  @override
  Future<bool> verifyOtp(String otpCode) async {
    debugPrint("[SignUpOtpRepository] Gọi API verify OTP cho luồng đăng ký");
    // TODO: call API real, giả lập OTP "123456" mới đúng
    await Future.delayed(const Duration(seconds: 1));
    return otpCode == "123456";
  }

  @override
  Future<void> resendOtp() async {
    debugPrint("[SignUpOtpRepository] Gọi API resend OTP đăng ký");
    // TODO: call API real
    await Future.delayed(const Duration(seconds: 1));
  }
}
