package usecase

import (
	"context"

	"haixun-backend/internal/model/member/domain/entity"
)

type RegisterRequest struct {
	TenantID    string
	Email       string
	Password    string
	DisplayName string
	Language    string
}

type LoginRequest struct {
	TenantID string
	Email    string
	Password string
}

type UpdateProfileRequest struct {
	TenantID    string
	UID         string
	DisplayName *string
	Avatar      *string
	Language    *string
	Currency    *string
	Phone       *string
}

type AuthToken struct {
	AccessToken  string
	RefreshToken string
	ExpiresIn    int64
	UID          string
	TokenType    string
}

type UseCase interface {
	Register(ctx context.Context, req RegisterRequest) (*entity.Member, *AuthToken, error)
	Login(ctx context.Context, req LoginRequest) (*entity.Member, *AuthToken, error)
	GetByUID(ctx context.Context, tenantID, uid string) (*entity.Member, error)
	UpdateProfile(ctx context.Context, req UpdateProfileRequest) (*entity.Member, error)
	SetActiveThreadsAccountID(ctx context.Context, tenantID, uid, accountID string) error
}
