import{aW as i,cg as a,b5 as o}from"./index-CS0Lg7FU.js";const c=i("lookup",{state:()=>({msgTypes:null,bussTypes:null,projectTaskStates:null,workflowProcessStates:null,lifecycleStates:null,changeStates:null,templateClassifications:null,workflowMetaTemplateClassifications:null,ecr_state:null,ecn_state:null,issue_state:null}),getters:{},actions:{async getMsgTypes(){if(!this.msgTypes){let s=await a("message_type_lookup");console.log(s);let t={};s.items.forEach(e=>{t[e.internal_name]=e.display_name}),this.msgTypes=t}return this.msgTypes},async getBussTypes(){if(!this.bussTypes){let s=await a("task_business_type_lookup"),t={};s.items.forEach(e=>{t[e.internal_name]=e.display_name}),this.bussTypes=t}return this.bussTypes},async getProjectTaskStates(){if(!this.projectTaskStates){let s=await a("project_task_state_lookup"),t={};s.items.forEach(e=>{t[e.internal_name]=e.display_name}),this.projectTaskStates=t}return this.projectTaskStates},async getWorkflowProcessStates(){if(!this.workflowProcessStates){let s=await a("workflow_process_state_lookup"),t={};s.items.forEach(e=>{t[e.internal_name]=e.display_name}),this.workflowProcessStates=t}return this.workflowProcessStates},async getLifecycleStates(){const s=o.global.t;if(!this.lifecycleStates){let t=await a("lifecycle_state_lookup"),e={};t.items.forEach(l=>{e[l.internal_name]=l.display_name}),e.checkout_state={"en-us":s("versionControl.checkout",{},{locale:"en-US"}),"zh-cn":s("versionControl.checkout",{},{locale:"zh-CN"}),"zh-tw":s("versionControl.checkout",{},{locale:"zh-TW"})},this.lifecycleStates=e}return this.lifecycleStates},async getChangeStates(){if(!this.changeStates){let s=await a("change_state_lookup"),t={};s.items.forEach(e=>{t[e.internal_name]=e.display_name}),this.changeStates=t}return this.changeStates},async getTemplateClassifications(){if(!this.templateClassifications){let s=await a("template_classification_lookup");console.log("getTemplateClassifications",s);let t={};s.items.forEach(e=>{t[e.internal_name]=e.display_name}),this.templateClassifications=t}return this.templateClassifications},async getWorkflowMetaTemplateClassifications(){if(!this.workflowMetaTemplateClassifications){let s=await a("workflow_meta_template_classification_lookup"),t={};s.items.forEach(e=>{t[e.internal_name]=e.display_name}),this.workflowMetaTemplateClassifications=t}return this.workflowMetaTemplateClassifications},SET_LOOKUPS(s){this.$patch(t=>{t[s.internal_name]=s.items})}}});export{c as u};
