System.register(["./page_layout-legacy.js?v=1764233927359","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1764233927359","./index-legacy99.js?v=1764233927359","./public-legacy.js?v=1764233927359","./vue-legacy.js?v=1764233927359","./naive-legacy.js?v=1764233927359"],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.bU,o=e.o,l=e.gh,r=e.x,i=e.a,n=e.gi,d=e.gj},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 B=e,{t:H}=u(),L=t(),P=f(null),W=v({template_id:null,project_name:"",remark:""}),q={template_id:{trigger:["change"],validator:()=>null!=W.template_id||new Error(H("Docker.Compose.form.index_5"))},project_name:{trigger:["blur","input"],validator:()=>""!==W.project_name.trim()||new Error(H("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})),W.template_id=e[0].id)}finally{F(!1)}},I=()=>{c({title:H("Docker.Compose.form.index_7"),footer:!0,width:650,minHeight:484,data:{onRefresh:()=>{G()}},component:C(()=>i(()=>a.import("./index-legacy264.js?v=1764233927359"),void 0))})};return(()=>{const{row:e,isEdit:a}=B;a&&e&&(W.template_id=e.template_id,W.project_name=e.name,W.remark=e.remark)})(),G(),_({onConfirm:async()=>{await(P.value?.validate());const e={template_id:W.template_id||0,project_name:W.project_name,remark:W.remark},{row:a,isEdit:t}=B;t&&a?await n({...e,project_id:a.id}):await d(e),L.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:P,model:y(W),rules:q,"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(W).template_id,"onUpdate:value":a[0]||(a[0]=e=>y(W).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(W).project_name,"onUpdate:value":a[1]||(a[1]=e=>y(W).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(W).remark,"onUpdate:value":a[2]||(a[2]=e=>y(W).remark=e),rows:3,placeholder:e.$t("Docker.Compose.form.index_4")},null,8,["value","placeholder"])])]),_:1},8,["label"])]),_:1},8,["model"])])}}}))}}});
