// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

// Code generated by "make generate-worktemplates"
// DO NOT EDIT

package worktemplates

func init() {
	{{- range .Categories}}
	registerWorkTemplateCategory("{{.ID}}", wtc{{.MD5}})
	{{- end -}}
	{{range .Templates}}
	registerWorkTemplate("{{.ID}}", wt{{.MD5}})
	{{- end}}

	// Register categories strings
	{{range .Categories -}}
	_ = T("{{.Name}}")
	{{end}}

	// Register translation strings
	{{range .Templates -}}
		{{if and (.Description.Channel) (ne .Description.Channel.ID "")}}_ = T("{{.Description.Channel.ID}}")
		{{end -}}
		{{if and (.Description.Board) (ne .Description.Board.ID "")}}_ = T("{{.Description.Board.ID}}")
		{{end -}}
		{{if and (.Description.Playbook) (ne .Description.Playbook.ID "")}}_ = T("{{.Description.Playbook.ID}}")
		{{end -}}
		{{if and (.Description.Integration) (ne .Description.Integration.ID "")}}_ = T("{{.Description.Integration.ID}}")
		{{end -}}
	{{end -}}
}

{{range .Categories}}
var wtc{{.MD5}} = &WorkTemplateCategory{
	ID:   "{{.ID}}",
	Name: "{{.Name}}",
}
{{end}}

{{range .Templates}}
var wt{{.MD5}} = &WorkTemplate{
	ID:           "{{.ID}}",
	Category:     "{{.Category}}",
	UseCase:      "{{.UseCase}}",
	Illustration: "{{.Illustration}}",
	Visibility:   "{{.Visibility}}",
	{{if .FeatureFlag}}FeatureFlag: &FeatureFlag{
		Name:  "{{.FeatureFlag.Name}}",
		Value: "{{.FeatureFlag.Value}}",
	},{{end}}
	Description: Description{
		{{if .Description.Channel}}Channel: &TranslatableString{
			ID:             "{{.Description.Channel.ID}}",
			DefaultMessage: "{{.Description.Channel.DefaultMessage}}",
			Illustration:   "{{.Description.Channel.Illustration}}",
		},{{end}}
		{{if .Description.Board}}Board: &TranslatableString{
			ID:             "{{.Description.Board.ID}}",
			DefaultMessage: "{{.Description.Board.DefaultMessage}}",
			Illustration:   "{{.Description.Board.Illustration}}",
		},{{end}}
		{{if .Description.Playbook}}Playbook: &TranslatableString{
			ID:			    "{{.Description.Playbook.ID}}",
			DefaultMessage: "{{.Description.Playbook.DefaultMessage}}",
			Illustration:   "{{.Description.Playbook.Illustration}}",
		},{{end}}
		{{if .Description.Integration}}Integration: &TranslatableString{
			ID:             "{{.Description.Integration.ID}}",
			DefaultMessage: "{{.Description.Integration.DefaultMessage}}",
			Illustration:   "{{.Description.Integration.Illustration}}",
		},{{end}}
	},
	Content: []Content{
		{{range .Content}}{
			{{if .Channel}}Channel: &Channel{
				ID:           "{{.Channel.ID}}",
				Name:         "{{.Channel.Name}}",
				Purpose:      "{{.Channel.Purpose}}",
				Playbook:     "{{.Channel.Playbook}}",
				Illustration: "{{.Channel.Illustration}}",
			},{{end}}{{if .Board}}Board: &Board{
				ID:           "{{.Board.ID}}",
				Template:     "{{.Board.Template}}",
				Name:         "{{.Board.Name}}",
				Channel:      "{{.Board.Channel}}",
				Illustration: "{{.Board.Illustration}}",
			},{{end}}{{if .Playbook}}Playbook: &Playbook{
				Template:     "{{.Playbook.Template}}",
				Name:         "{{.Playbook.Name}}",
				ID:           "{{.Playbook.ID}}",
				Illustration: "{{.Playbook.Illustration}}",
			},{{end}}{{if .Integration}}Integration: &Integration{
				ID: "{{.Integration.ID}}",
			},{{end}}
		},
		{{end}}
	},
}
{{end}}
