System.register(["./page_layout-legacy.js?v=1764830988434","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1764830988434","./index-legacy97.js?v=1764830988434","./public-legacy.js?v=1764830988434","./vue-legacy.js?v=1764830988434","./naive-legacy.js?v=1764830988434"],function(e,a){"use strict";var t,o,l,r,i,n,d,p,m,s,c,_,u,f,v,g,k,x,j,w,y,h,b,C,D,$,E;return{setters:[e=>{t=e.bq,o=e.o,l=e.g9,r=e.x,i=e.a,n=e.ga,d=e.gb},e=>{p=e._},e=>{m=e._},e=>{s=e.d,c=e.u},e=>{_=e.k,u=e.P,f=e.r,v=e.e,g=e.R,k=e.V,x=e.W,j=e.a3,w=e.S,y=e.U,h=e.j,b=e.a4,C=e._},e=>{D=e.dR,$=e.dV,E=e.au}],execute:function(){const R={class:"p-20px"},U={class:"w-300px"},S={class:"w-300px"},V={class:"w-300px"};e("_",_({__name:"index",props:{row:{default:void 0},isEdit:{type:Boolean,default:!1}},setup(e,{expose:_}){const q=e,{t:B}=u(),H=t(),L=f(null),P=v({template_id:null,project_name:"",remark:""}),W={template_id:{trigger:["change"],validator:()=>null!=P.template_id||new Error(B("Docker.Compose.form.index_5"))},project_name:{trigger:["blur","input"],validator:()=>""!==P.project_name.trim()||new Error(B("Docker.Compose.form.index_6"))}},z=f([]),{loading:A,setLoading:F}=s(),G=async()=>{try{F(!0);const{message:e}=await l();r(e)&&(z.value=e.map(e=>({label:e.name,value:e.id})),P.template_id=e[0].id)}finally{F(!1)}},I=()=>{c({title:B("Docker.Compose.form.index_7"),footer:!0,width:650,minHeight:484,data:{onRefresh:()=>{G()}},component:C(()=>i(()=>a.import("./index-legacy265.js?v=1764830988434"),void 0))})};return(()=>{const{row:e,isEdit:a}=q;a&&e&&(P.template_id=e.template_id,P.project_name=e.name,P.remark=e.remark)})(),G(),_({onConfirm:async()=>{await(L.value?.validate());const e={template_id:P.template_id||0,project_name:P.project_name,remark:P.remark},{row:a,isEdit:t}=q;t&&a?await n({...e,project_id:a.id}):await d(e),H.setRefresh(!0)}}),(e,a)=>{const t=$,l=o,r=D,i=E,n=m,d=p;return k(),g("div",R,[x(d,{ref_key:"formRef",ref:L,model:y(P),rules:W,"label-width":"150"},{default:j(()=>[x(r,{label:e.$t("Docker.Compose.form.index_1"),path:"template_id"},{default:j(()=>[w("div",U,[x(t,{value:y(P).template_id,"onUpdate:value":a[0]||(a[0]=e=>y(P).template_id=e),loading:y(A),options:y(z)},null,8,["value","loading","options"])]),x(l,{class:"ml-8px",onClick:I},{default:j(()=>[h(b(e.$t("Docker.Compose.form.index_2")),1)]),_:1})]),_:1},8,["label"]),x(r,{label:e.$t("Docker.Compose.form.index_3"),path:"project_name"},{default:j(()=>[w("div",S,[x(i,{value:y(P).project_name,"onUpdate:value":a[1]||(a[1]=e=>y(P).project_name=e),placeholder:e.$t("Docker.Compose.form.index_3")},null,8,["value","placeholder"])])]),_:1},8,["label"]),x(r,{label:e.$t("Docker.Compose.form.index_4"),path:"remark","show-feedback":!1},{default:j(()=>[w("div",V,[x(n,{value:y(P).remark,"onUpdate:value":a[2]||(a[2]=e=>y(P).remark=e),rows:3,placeholder:e.$t("Docker.Compose.form.index_4")},null,8,["value","placeholder"])])]),_:1},8,["label"])]),_:1},8,["model"])])}}}))}}});
