package systemconfig

import "encoding/json"

const homeAnnouncementsConfigKey = "mobile.home_announcements"
const homeBannersConfigKey = "mobile.home_banners"

func defaultHomeAnnouncements() []string {
	return []string{
		"平台担保交易，拒绝私下转账/共享验证码，交接全程留痕。",
		"优先推荐同地区账号，减少异地登录保护触发。",
		"下单前请核对哈夫币、保险、体力负重和截图信息。",
	}
}

func defaultHomeAnnouncementsConfigValue() string {
	raw, err := json.Marshal(defaultHomeAnnouncements())
	if err != nil {
		return "[]"
	}
	return string(raw)
}

func defaultHomeBanners() []HomeBannerItem {
	return []HomeBannerItem{
		{
			Eyebrow:  "三角洲行动账号专区",
			Title:    "高哈夫币 · 安全交接 · 随租随玩",
			Badge:    "HOT",
			Pill:     "新人领券最高减 20 元",
			Tone:     "blue",
			ImageURL: "",
		},
		{
			Eyebrow:  "平台担保交易",
			Title:    "交接全程留痕，拒绝私下转账",
			Badge:    "SAFE",
			Pill:     "租号前先验实名与资料",
			Tone:     "green",
			ImageURL: "",
		},
		{
			Eyebrow:  "高效筛选",
			Title:    "按区服、段位、哈夫币快速找号",
			Badge:    "FAST",
			Pill:     "支持扫码号与账密号",
			Tone:     "orange",
			ImageURL: "",
		},
	}
}

func defaultHomeBannersConfigValue() string {
	raw, err := json.Marshal(defaultHomeBanners())
	if err != nil {
		return "[]"
	}
	return string(raw)
}
