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