package vui

import (
	"netease_control_center/interfaces/vui/cvui"
)

const (
	LOCAL_SRC_URL_BASE string = "/usr/share/voice/"
)

const (
	SUCCESS_SE         = "successSe"
	FAIL_SE            = "failSe"
	WAKE_UP            = "wakeup"
	HELLO              = "hello"
	WIFI_CONED_COM     = "wifiConedCom"
	WIFI_CONED_MORNING = "wifiConedMorning"
	WIFI_CONED_NIGHT   = "wifiConedNight"
	WIFI_CON_GUIDE     = "wifiConGuide"
	WIFI_CON_PREPARE   = "wifiConPrepare"
	WIFI_CON_OUT       = "wifiConOut"
	WIFI_CONNING       = "wifiConning"
	WIFI_DISCON        = "wifiDiscon"
	WIFI_ERR_BLE_CON   = "wifiErrBleCon"
	WIFI_ERR_PASSWD    = "wifiErrPasswd"
)

type VoiceSrcInfo struct {
	Url      string
	CheckSum string
}

var (
	VoiceSrcUrlManager = map[string]VoiceSrcInfo{
		SUCCESS_SE:         VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "successSe.m4a"},
		FAIL_SE:            VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "failSe.m4a"},
		WAKE_UP:            VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "successSe.m4a"},
		HELLO:              VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "hello.mp3"},
		WIFI_CONED_COM:     VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiConedCom.mp3"},
		WIFI_CONED_MORNING: VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiConedMorning.mp3"},
		WIFI_CONED_NIGHT:   VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiConedNight.mp3"},
		WIFI_CON_GUIDE:     VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiConGuide.mp3"},
		WIFI_CON_PREPARE:   VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiConPrepare.mp3"},
		WIFI_CON_OUT:       VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiConOut.mp3"},
		WIFI_CONNING:       VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiConning.mp3"},
		WIFI_DISCON:        VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiDiscon.mp3"},
		WIFI_ERR_BLE_CON:   VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiErrBleCon.mp3"},
		WIFI_ERR_PASSWD:    VoiceSrcInfo{Url: LOCAL_SRC_URL_BASE + "wifiErrPasswd.mp3"},
	}
)

type SoundNotice string

const (
	SoundNotice_Achushihua001 SoundNotice = "v001" //你好 todo: delete!

	SoundNotice_Alianwang001     SoundNotice = "v101" //请打开网易云音乐APP，进入账号页面为音箱连网
	SoundNotice_Alianwang002     SoundNotice = "v102" // 请扫描说明书上二维码，下载网易三音app，按照提示为音箱联网
	SoundNotice_Alianwang003     SoundNotice = "v103" // 开始为音箱连网，请根据APP上的提示继续操作
	SoundNotice_Alianwang004     SoundNotice = "v104" // 正在努力为你连网，请稍等
	SoundNotice_Alianwang005     SoundNotice = "v105" // 连网失败，请根据APP提示重新连网
	SoundNotice_Alianwang006     SoundNotice = "v106" //暂时不支持5G频段的Wi-Fi，请连接其他Wi-Fi
	SoundNotice_Alianwang007     SoundNotice = "v107" //用户名或密码错误  ，请重新输入
	SoundNotice_Alianwang008     SoundNotice = "v108" //网络连接异常，请稍后再试或联系客服
	SoundNotice_Alianwang009     SoundNotice = "v109" //网络连接异常，请检查路由器状态
	SoundNotice_Alianwang010     SoundNotice = "v110" //网络已断开，请根据APP提示重新连网
	SoundNotice_Alianwang011     SoundNotice = "v111" //音箱已退出连网流程
	SoundNotice_Alianwang012     SoundNotice = "v112" //已进入ap配网模式,请根据app提示继续操作
	SoundNotice_Alianwang014     SoundNotice = "v114" //连接异常,请尝试将音箱放在靠近路由器的位置重新连接
	SoundNotice_Song_Get_Timeout SoundNotice = "v401" //歌曲拉取超时错误提示

	SoundNotice_Ashiyong001 SoundNotice = "v201" //Hi，我是小易，谢谢你带我回家！我可以播音乐，查天气，收听电台，你可以试着和我说 ‘Hi 小易， 播放蔡琴的《渡口》
	SoundNotice_Ashiyong002 SoundNotice = "v202" //Hi 早上好，我在了
	SoundNotice_Ashiyong003 SoundNotice = "v203" //Hi 上午好，我在了
	SoundNotice_Ashiyong004 SoundNotice = "v204" //Hi 中午好，我在了
	SoundNotice_Ashiyong005 SoundNotice = "v205" //Hi 下午好，我在了
	SoundNotice_Ashiyong006 SoundNotice = "v206" //Hi，晚上好，我在了

	SoundNotice_Spinpaiyinyue001       SoundNotice = "v301"  //品牌音乐
	SoundNotice_S002                   SoundNotice = "v302"  //联网后引导音乐, user id change
	SoundNotice_Shuanxing001           SoundNotice = "v303"  //唤醒成功 详细说明见PRD 二期 B 02 D 01
	SoundNotice_Snaozhong001           SoundNotice = "v304"  //闹钟铃声
	SoundNotice_SnaozhongInternetDown1 SoundNotice = "v5011" // [a-a-01] 你有个闹钟，现在到时间了
	SoundNotice_SnaozhongInternetDown2 SoundNotice = "v5012" // a-a-02 你原定在十分钟前有个闹钟，别错过了
	SoundNotice_SnaozhongInternetDown3 SoundNotice = "v5013" // a-a-03 你原定在二十分钟前有个闹钟，别错过了

	SoundNotice_TixingInternetDown SoundNotice = "v502" //a-n-01 你有个提醒，现在到时间了

	SoundNotice_Stixing001           SoundNotice = "v305" //提醒铃声
	SoundNotice_S006                 SoundNotice = "v306" //联网模式反馈
	SoundNotice_Slianjiechenggong001 SoundNotice = "v307" //联网成功
	SoundNotice_Slianwangshibai001   SoundNotice = "v308" //联网失败
	SoundNotice_Scaozuofankui001     SoundNotice = "v309" //操作反馈 S009
	SoundNotice_Volume               SoundNotice = "v310" //音量加减反馈
	SoundNotice_Stuichufankui001     SoundNotice = "v311" //退出反馈

	SoundNotice_WifiParing_AP_Welcome   SoundNotice = "v112" //音箱已进入热点联网模式
	SoundNotice_WifiParing_Ble_Welecome SoundNotice = "v102"

	SoundNotice_Error_Network SoundNotice = "v401" //唤醒未建立连接情况  内容加载失败 （如歌曲拉取超时）
	SoundNotice_Error_System  SoundNotice = "v402" //系统错误
	SoundNotice_Error_Voice   SoundNotice = "v403" //语音识别超时 #PV1-3126

	SoundNotice_Mic_Close SoundNotice = "v601" //麦克风已禁用
	SoundNotice_Mic_Open  SoundNotice = "v602" //麦克风已启用

	SoundNotice_Enter_BtOnWifiOff SoundNotice = "v701" //正在进入蓝牙单通道模式
	SoundNotice_Exit_BtOnWifiOff  SoundNotice = "v703" //正在退出蓝牙单通道模式
	SoundNotice_Warn_BtOnWifiOff  SoundNotice = "v702" //请先长按顶部按键退出蓝牙单通道模式后再使用

	SoundNotice_IOT_Finding SoundNotice = "v905" //正在为你扫描周围的智能设备，请耐心等待
	SoundNotice_IOT_Finded SoundNotice = "v906" //已为你找到设备，现在开始联网，请稍等
	SoundNotice_IOT_NotFound SoundNotice = "v909" //抱歉，没有找到附近的智能设备，请检查该设备是否在配网状态
	SoundNotice_IOT_ConnectedSuccess SoundNotice = "v907" //与设备连接成功，快打开三音APP，进入智能家居页面学习怎么操作吧
	SoundNotice_IOT_ConnectedFail SoundNotice = "v908" //抱歉，连接设备失败，请检查该设备的网络状况后再试一下吧

	SoundNotice_PullFromServer_Timeout SoundNotice = "v801" //暂时没办法为你继续播放了，待会儿再试试吧

)

func (this SoundNotice) GetPath() string {
	return cvui.GetSkinRes(string(this))
}
