package formview

import (
	"go_dreamfactory/cmd/v2/lib/common"

	"fyne.io/fyne/v2/widget"
)

// 获取任务标签
func getTaskTagSelect() *widget.Select {
	var tagSelect *widget.Select
	tagSelect = widget.NewSelect([]string{
		common.AAP_TESTCASE_FORM_TASK_DAY,
		common.APP_TESTCASE_FORM_TASK_WEEK,
		common.APP_TESTCASE_FORM_TASK_ACHIEVE}, func(s string) {
		switch s {
		case common.AAP_TESTCASE_FORM_TASK_DAY:
			tagSelect.Selected = "1"
		case common.APP_TESTCASE_FORM_TASK_WEEK:
			tagSelect.Selected = "2"
		case common.APP_TESTCASE_FORM_TASK_ACHIEVE:
			tagSelect.Selected = "3"
		default:
			tagSelect.Selected = "0"
		}

	})
	tagSelect.SetSelectedIndex(0)
	return tagSelect
}

