package domain

import "errors"

// 密碼政策文案（與 FE password.policy.hint / api.err.400003 一致）
const (
	PasswordMinLen   = 12
	PasswordPolicyEN = "Password must be at least 12 characters with upper, lower, digit, and symbol"
	PasswordPolicyZH = "密碼須至少 12 碼，且含大寫、小寫、數字與符號"
)

var (
	ErrNotFound           = errors.New("member not found")
	ErrEmailNotRegistered = errors.New("email not registered")
	ErrEmailTaken         = errors.New("email already exists")
	ErrPhoneTaken         = errors.New("phone already exists")
	ErrIdentityTaken      = errors.New("login identity already bound")
	ErrIdentityNotFound   = errors.New("login identity not found")
	ErrBadPassword        = errors.New("invalid credentials")
	ErrSuspended          = errors.New("account suspended")
	ErrUnverified         = errors.New("account not verified")
	ErrLastAdmin          = errors.New("cannot demote or suspend the last active admin")
	ErrSelfSuspend        = errors.New("cannot suspend yourself")
	// ErrWeakPassword — API 400003；Message = PasswordPolicyEN
	ErrWeakPassword    = errors.New(PasswordPolicyEN)
	ErrInvalidCode     = errors.New("invalid or expired code")
	ErrCodeRateLimited = errors.New("verification code requested too frequently")
	ErrAlreadyBound    = errors.New("already bound")
	ErrInvalidPlatform = errors.New("invalid platform")
	ErrOAuthFailed     = errors.New("oauth verification failed")

	// 邀請網絡（message = FE i18n key invite.err.*）
	ErrInviteAlreadyBound = errors.New("invite.err.alreadyBound")
	ErrInviteCodeRequired = errors.New("invite.err.codeRequired")
	ErrInviteCodeNotFound = errors.New("invite.err.codeNotFound")
	ErrInviteCodeSelf     = errors.New("invite.err.codeSelf")
	ErrInviteCycle        = errors.New("invite.err.cycle")
	ErrInviteSelfParent   = errors.New("invite.err.selfParent")
	ErrInviteParentMiss   = errors.New("invite.err.parentNotFound")
	ErrInviteNeedAdmin    = errors.New("invite.err.needAdmin")
)
