package usecase

import (
	"backend/pkg/notification/domain/repository"
	"context"
)

type DeliveryUseCase interface {
	SendMessage(ctx context.Context, req SMSMessageRequest) error
	SendEmail(ctx context.Context, req MailReq) error
}

type MailReq struct {
	To         []string
	From       string
	SenderName string
	Subject    string
	Body       string
}

type SMSMessageRequest struct {
	PhoneNumber    string `json:"phone_number" validate:"required,e164"` // 接收者號碼 (e164 格式用於驗證國際號碼)
	RecipientName  string `json:"recipient_name" validate:"required"`    // 接收者姓名
	MessageContent string `json:"message_content" validate:"required"`   // 要傳送的訊息
}

type EmailTemplateResp struct {
	Subject string `json:"subject"` // 郵件主題
	Body    string `json:"body"`    // 郵件內容
}

type SMSTemplateResp struct {
	Body string `json:"body"`
}

type SMSProvider struct {
	Sort int64
	Repo repository.SMSClientRepository
}

type EmailProvider struct {
	Sort int64
	Repo repository.MailRepository
}
