using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Http
{
    public class RequestOtpReq
    {
        [Required(ErrorMessage = "Email is required")]
        [EmailAddress(ErrorMessage = "Invalid email format")]
        public string? email { get; set; }

        /// <summary>
        /// Language code for email template: "vi" (Vietnamese), "en" (English), "lo" (Lao)
        /// Default: "vi"
        /// </summary>
        public string? lang { get; set; } = "vi";
    }

    public class VerifyOtpReq
    {
        [Required(ErrorMessage = "Email is required")]
        [EmailAddress(ErrorMessage = "Invalid email format")]
        public string? email { get; set; }

        [Required(ErrorMessage = "OTP is required")]
        public string? otpCode { get; set; }

        /// <summary>
        /// Language code for response messages: "lo" (Lao), "en" (English)
        /// Default: "lo"
        /// </summary>
        public string? lang { get; set; } = "lo";
    }

    public class GoogleCallbackReq
    {
        [Required(ErrorMessage = "Authorization code is required")]
        public string code { get; set; }
        
        public string? redirectUri { get; set; } // Optional: if frontend handles redirect, it might need to pass this

        public string? lang { get; set; } = "lo";
    }

    public class GoogleLoginReq
    {
        /// <summary>
        /// Language code for response messages: "lo" (Lao), "en" (English)
        /// Default: "lo"
        /// </summary>
        public string? lang { get; set; } = "lo";
    }

    public class PartnerLoginReq
    {
        [Required(ErrorMessage = "Authorization code is required")]
        public string data { get; set; }

        [Required(ErrorMessage = "Partner is required")]
        public string partner { get; set; } // Optional: if frontend handles redirect, it might need to pass this

    }

}
