System.register(["./page_layout-legacy.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./index-legacy99.js?v=1763625242172","./public-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172"],(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.gg,l=e.x,r=e.a,i=e.gh,n=e.gi,d=e.o},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.S,x=e.X,j=e.a3,w=e.U,y=e.V,h=e.j,b=e.a4,C=e._},e=>{D=e.dV,$=e.dP,E=e.au}],execute:function(){const U={class:"p-20px"},R={class:"w-300px"},P={class:"w-300px"},S={class:"w-300px"};e("_",_({__name:"index",props:{row:{default:void 0},isEdit:{type:Boolean,default:!1}},setup(e,{expose:_}){const V=e,{t:B}=u(),H=t(),L=f(null),X=v({template_id:null,project_name:"",remark:""}),q={template_id:{trigger:["change"],validator:()=>null!=X.template_id||new Error(B("Docker.Compose.form.index_5"))},project_name:{trigger:["blur","input"],validator:()=>""!==X.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 o();l(e)&&(z.value=e.map((e=>({label:e.name,value:e.id}))),X.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((()=>r((()=>a.import("./index-legacy264.js?v=1763625242172")),void 0)))})};return(()=>{const{row:e,isEdit:a}=V;a&&e&&(X.template_id=e.template_id,X.project_name=e.name,X.remark=e.remark)})(),G(),_({onConfirm:async()=>{await(L.value?.validate());const e={template_id:X.template_id||0,project_name:X.project_name,remark:X.remark},{row:a,isEdit:t}=V;t&&a?await i({...e,project_id:a.id}):await n(e),H.setRefresh(!0)}}),(e,a)=>{const t=D,o=d,l=$,r=E,i=m,n=p;return g(),k("div",U,[x(n,{ref_key:"formRef",ref:L,model:y(X),rules:q,"label-width":"150"},{default:j((()=>[x(l,{label:e.$t("Docker.Compose.form.index_1"),path:"template_id"},{default:j((()=>[w("div",R,[x(t,{value:y(X).template_id,"onUpdate:value":a[0]||(a[0]=e=>y(X).template_id=e),loading:y(A),options:y(z)},null,8,["value","loading","options"])]),x(o,{class:"ml-8px",onClick:I},{default:j((()=>[h(b(e.$t("Docker.Compose.form.index_2")),1)])),_:1})])),_:1},8,["label"]),x(l,{label:e.$t("Docker.Compose.form.index_3"),path:"project_name"},{default:j((()=>[w("div",P,[x(r,{value:y(X).project_name,"onUpdate:value":a[1]||(a[1]=e=>y(X).project_name=e),placeholder:e.$t("Docker.Compose.form.index_3")},null,8,["value","placeholder"])])])),_:1},8,["label"]),x(l,{label:e.$t("Docker.Compose.form.index_4"),path:"remark","show-feedback":!1},{default:j((()=>[w("div",S,[x(i,{value:y(X).remark,"onUpdate:value":a[2]||(a[2]=e=>y(X).remark=e),rows:3,placeholder:e.$t("Docker.Compose.form.index_4")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}}))}}}));
