import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{_ as a}from"./index100.js?v=1753954525509";import{bg as r,fx as l,cZ as t,fy as o,bl as n}from"./page_layout.js?v=1753954525509";import"./public.js?v=1753954525509";import{k as i,P as d,r as u,e as s,U as v,V as p,Q as m,a2 as c,W as _,X as w,ah as k,N as f}from"./vue.js?v=1753954525509";import{aq as b,cA as x,cG as g,c5 as h}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const N={class:"p-20px"},D={class:"w-420px"},y={class:"w-420px"},$={class:"flex"},U={class:"w-150px"},j={class:"w-150px"},E={class:"w-420px"},R={class:"flex"},q={class:"w-150px"},A={class:"w-150px"},C={class:"w-420px"},G=i({__name:"index",setup(i,{expose:G}){const{t:H}=d(),P=r(),Q=u(null),V=u(!1),W=s({name:"",driver:"bridge",options:"",subnet:"",gateway:"",iprange:"",labels:"",subnet_v6:"",gateway_v6:"",remark:""}),X=[{label:"bridge",value:"bridge"},{label:"ipvlan",value:"ipvlan"},{label:"macvlan",value:"macvlan"},{label:"overlay",value:"overlay"}],Z=e=>{e||(W.subnet_v6="",W.gateway_v6="")},z={name:{trigger:["blur","input"],validator:()=>""!==W.name.trim()||new Error(H("Docker.Network.form.index_2"))},subnet:{trigger:["blur","input"],validator:()=>""===W.subnet.trim()?new Error(H("Docker.Network.form.index_10")):!!l(W.subnet.trim())||new Error(H("Docker.Network.form.index_11"))},gateway:{trigger:["blur","input"],validator:()=>""===W.gateway.trim()?new Error(H("Docker.Network.form.index_12")):!!t(W.gateway.trim())||new Error(H("Docker.Network.form.index_13"))},iprange:{trigger:["blur","input"],validator:()=>""===W.iprange.trim()?new Error(H("Docker.Network.form.index_14")):!!l(W.iprange.trim())||new Error(H("Docker.Network.form.index_15"))},subnet_v6:{trigger:["blur","input"],validator:()=>""!==W.subnet_v6.trim()||new Error(H("Docker.Network.form.index_19"))},gateway_v6:{trigger:["blur","input"],validator:()=>""!==W.gateway_v6.trim()||new Error(H("Docker.Network.form.index_20"))}};return G({onConfirm:async()=>{var e;await(null==(e=Q.value)?void 0:e.validate()),await o(f(W)),P.setRefresh(!0)}}),(r,l)=>{const t=b,o=x,i=g,d=h,u=n,s=a,f=e;return v(),p("div",N,[m(f,{ref_key:"formRef",ref:Q,model:w(W),rules:z},{default:c((()=>[m(o,{label:r.$t("Docker.Network.form.index_1"),path:"name"},{default:c((()=>[_("div",D,[m(t,{value:w(W).name,"onUpdate:value":l[0]||(l[0]=e=>w(W).name=e),placeholder:r.$t("Docker.Network.form.index_2")},null,8,["value","placeholder"])])])),_:1},8,["label"]),m(o,{label:r.$t("Docker.Network.form.index_21"),path:"driver"},{default:c((()=>[_("div",y,[m(i,{value:w(W).driver,"onUpdate:value":l[1]||(l[1]=e=>w(W).driver=e),options:X},null,8,["value"])])])),_:1},8,["label"]),_("div",$,[m(o,{label:r.$t("Docker.Network.form.index_3"),path:"subnet"},{default:c((()=>[_("div",U,[m(t,{value:w(W).subnet,"onUpdate:value":l[2]||(l[2]=e=>w(W).subnet=e),placeholder:r.$t("Docker.Network.form.index_4")},null,8,["value","placeholder"])])])),_:1},8,["label"]),m(o,{label:r.$t("Docker.Network.form.index_5"),path:"gateway","label-width":"120"},{default:c((()=>[_("div",j,[m(t,{value:w(W).gateway,"onUpdate:value":l[3]||(l[3]=e=>w(W).gateway=e),placeholder:r.$t("Docker.Network.form.index_6")},null,8,["value","placeholder"])])])),_:1},8,["label"])]),m(o,{label:r.$t("Docker.Network.form.index_7"),path:"iprange"},{default:c((()=>[_("div",E,[m(t,{value:w(W).iprange,"onUpdate:value":l[4]||(l[4]=e=>w(W).iprange=e),placeholder:r.$t("Docker.Network.form.index_8")},null,8,["value","placeholder"])])])),_:1},8,["label"]),m(o,{label:r.$t("Docker.Network.form.index_16")},{default:c((()=>[m(d,{value:w(V),"onUpdate:value":[l[5]||(l[5]=e=>k(V)?V.value=e:null),Z]},null,8,["value"])])),_:1},8,["label"]),m(u,{show:w(V),"display-directive":"show"},{default:c((()=>[_("div",R,[m(o,{label:r.$t("Docker.Network.form.index_17"),path:"subnet_v6"},{default:c((()=>[_("div",q,[m(t,{value:w(W).subnet_v6,"onUpdate:value":l[6]||(l[6]=e=>w(W).subnet_v6=e),placeholder:r.$t("Docker.Network.form.index_22")},null,8,["value","placeholder"])])])),_:1},8,["label"]),m(o,{label:r.$t("Docker.Network.form.index_18"),path:"gateway_v6","label-width":"120"},{default:c((()=>[_("div",A,[m(t,{value:w(W).gateway_v6,"onUpdate:value":l[7]||(l[7]=e=>w(W).gateway_v6=e),placeholder:r.$t("Docker.Network.form.index_23")},null,8,["value","placeholder"])])])),_:1},8,["label"])])])),_:1},8,["show"]),m(o,{label:r.$t("Docker.Network.form.index_9"),path:"remark","show-feedback":!1},{default:c((()=>[_("div",C,[m(s,{value:w(W).remark,"onUpdate:value":l[8]||(l[8]=e=>w(W).remark=e),rows:3,placeholder:r.$t("Docker.Network.form.index_9")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}});export{G as default};
