package resource

const (
	TypeAvatarFrame = "avatar_frame"
	TypeProfileCard = "profile_card"
	TypeCoin        = "coin"
	TypeVehicle     = "vehicle"
	TypeChatBubble  = "chat_bubble"
	TypeBadge       = "badge"
	// TypeFloatingScreen 是用户单选佩戴的飘窗皮肤；素材消费方读取装备快照，
	// 商店和背包仍复用通用资源 SKU、entitlement 与 equipment 契约。
	TypeFloatingScreen = "floating_screen"
	TypeGift           = "gift"
	// TypeGiftTraySkin 复用 VIP 权益的稳定编码；目录素材与 gift 礼物本体分开，
	// 避免客户端把送礼托盘皮肤误当成可发送、可定价的礼物。
	TypeGiftTraySkin     = "gift_tray_skin"
	TypeMicSeatIcon      = "mic_seat_icon"
	TypeMicSeatAnimation = "mic_seat_animation"
	// TypeRoomBorder 与 TypeRoomNameStyle 是房间级装扮目录类型；应用动作必须进入 Room Cell，
	// 不能复用 user_resource_equipment 把房间状态错误地挂到用户全局 appearance。
	TypeRoomBorder    = "room_border"
	TypeRoomNameStyle = "room_name_style"
	TypeEmojiPack     = "emoji_pack"
	// TypeVIPTrialCard 是可在背包中独立计时、单选佩戴的 VIP 体验卡。
	// VIP 等级和有效期事实仍由 user_vip_trial_cards 保存，资源目录只负责素材和通用背包展示。
	TypeVIPTrialCard = "vip_trial_card"

	StatusActive   = "active"
	StatusDisabled = "disabled"
	StatusDeleted  = "deleted"

	GrantStrategyWalletCredit     = "wallet_credit"
	GrantStrategyNewEntitlement   = "new_entitlement"
	GrantStrategyExtendExpiry     = "extend_expiry"
	GrantStrategyIncreaseQuantity = "increase_quantity"
	GrantStrategySetActiveFlag    = "set_active_flag"

	GrantSubjectResource      = "resource"
	GrantSubjectGroup         = "resource_group"
	GrantSubjectGroupSnapshot = "resource_group_snapshot"

	GrantSourceAdmin         = "admin"
	GrantSourceManagerCenter = "manager_center"
	GrantSourceGrowthLevel   = "growth_level"
	GrantSourceAchievement   = "achievement"
	GrantSourceResourceShop  = "resource_shop"
	GrantSourceGameRobotInit = "game_robot_init"
	// GrantSourceVIPPaid 与 GrantSourceVIPTrial 把两种 VIP 生效来源的 entitlement
	// 完全隔离；任一来源到期或撤销都不能缩短另一来源仍有效的装扮权益。
	GrantSourceVIPPaid  = "vip_paid"
	GrantSourceVIPTrial = "vip_trial"
	GrantStatusDone     = "succeeded"
	GrantStatusRevoked  = "revoked"
	ResultWalletCredit  = "wallet_credit"
	ResultEntitlement   = "entitlement"

	GroupItemTypeResource    = "resource"
	GroupItemTypeWalletAsset = "wallet_asset"

	GiftTypeNormal     = "normal"
	GiftTypeCP         = "cp"
	GiftTypeLucky      = "lucky"
	GiftTypeSuperLucky = "super_lucky"
	GiftTypeExclusive  = "exclusive"
	GiftTypeNoble      = "noble"
	// GiftTypeVIP 兼容运营已创建的显式 vip 类型；历史默认“贵族礼物”使用 noble，
	// 两者都属于需要绑定具体 VIP 等级的礼物目录类型。
	GiftTypeVIP      = "vip"
	GiftTypeFlag     = "flag"
	GiftTypeActivity = "activity"
	GiftTypeMagic    = "magic"
	GiftTypeCustom   = "custom"

	GiftTypeTabKeyNormal     = "Gift"
	GiftTypeTabKeyCP         = "CP"
	GiftTypeTabKeyLucky      = "Lucky"
	GiftTypeTabKeySuperLucky = "Super Lucky"
	GiftTypeTabKeyExclusive  = "Exclusive"
	GiftTypeTabKeyNoble      = "Noble"
	GiftTypeTabKeyFlag       = "Flag"
	GiftTypeTabKeyActivity   = "Activity"
	GiftTypeTabKeyMagic      = "Magic"
	GiftTypeTabKeyCustom     = "Custom"

	GiftEffectAnimation       = "animation"
	GiftEffectMusic           = "music"
	GiftEffectGlobalBroadcast = "global_broadcast"

	PriceTypeCoin = "coin"
	PriceTypeFree = "free"

	ShopDurationOneDay    int32 = 1
	ShopDurationThreeDays int32 = 3
	ShopDurationSevenDays int32 = 7
)

// IsVIPGiftType 将历史 noble 与显式 vip 编码收敛为同一业务语义，避免运营只改
// 展示名称后，后台和客户端对是否需要 vip_level 产生不同判断。
func IsVIPGiftType(value string) bool {
	switch NormalizeGiftTypeCode(value) {
	case GiftTypeNoble, GiftTypeVIP:
		return true
	default:
		return false
	}
}
