import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{hF as e,hG as l,hH as t,d as r,h as d}from"./page_layout.js?v=1764233927359";import s from"./index100.js?v=1764233927359";import{k as o,t as n,P as u,r as i,e as m,R as p,V as v,W as _,a3 as c,S as f,U as h,N as k}from"./vue.js?v=1764233927359";import{dR as x,au as w}from"./naive.js?v=1764233927359";const b={class:"w-350px"},g={class:"w-350px"},j={class:"w-476px"},y=o({__name:"index",props:{row:{},isEdit:{type:Boolean,default:!1}},setup(o,{expose:y}){const D=o,T=n(D,"row"),$=n(D,"isEdit"),{t:U}=u(),E=i(null),R=m({name:"",remark:"",data:""}),B={name:{trigger:["blur","input"],validator:()=>""!==R.name.trim()||new Error(U("Docker.Template.add.index_2"))}};return(async()=>{if($.value&&T.value){R.name=T.value.name,R.remark=T.value.remark;const{message:a}=await t({template_id:T.value.id});r(a)&&(R.data=d(a.result)?a.result:"")}})(),y({onConfirm:async()=>{var a;await(null==(a=E.value)?void 0:a.validate()),$.value&&T.value?await e({...k(R),id:T.value.id}):await l(k(R))}}),(e,l)=>{const t=w,r=x,d=a;return v(),p("div",null,[_(d,{ref_key:"formRef",ref:E,model:h(R),rules:B},{default:c(()=>[_(r,{label:e.$t("Docker.Template.add.index_1"),path:"name"},{default:c(()=>[f("div",b,[_(t,{value:h(R).name,"onUpdate:value":l[0]||(l[0]=a=>h(R).name=a),placeholder:e.$t("Docker.Template.add.index_2")},null,8,["value","placeholder"])])]),_:1},8,["label"]),_(r,{label:e.$t("Docker.Template.add.index_3"),path:"remark"},{default:c(()=>[f("div",g,[_(t,{value:h(R).remark,"onUpdate:value":l[1]||(l[1]=a=>h(R).remark=a),placeholder:e.$t("Docker.Template.add.index_3")},null,8,["value","placeholder"])])]),_:1},8,["label"]),_(r,{label:e.$t("Docker.Template.add.index_4"),path:"data","show-feedback":!1},{default:c(()=>[f("div",j,[_(s,{value:h(R).data,"onUpdate:value":l[2]||(l[2]=a=>h(R).data=a),lang:"json",theme:"monokai",height:"300","show-tips":!1},null,8,["value"])])]),_:1},8,["label"])]),_:1},8,["model"])])}}});export{y as _};
