import{aP as s,P as e,iK as a,K as r,_ as o}from"./utils-lib.js?v=1761009159";import{c as i,aA as l,g as t,at as m,v as n,x as u,e as d,y as c}from"./base-lib.js?v=1761009159";import{b as p,n as v,c as b}from"./form-item.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const{refs:{isRefreshStorageList:_}}=s(),f={class:"flex flex-col p-[1.6rem] lib-box"},w=o(i({__name:"index",setup(s,{expose:o}){const i=l("popupClose",()=>{}),{BtForm:w,submit:x}=r({data:()=>({name:"",driver:"local",driver_opts:"",labels:"",remark:"",isAdv:!1}),options:s=>t(()=>[p("卷名","name",{attrs:{class:"!w-[35rem]",placeholder:"请输入卷名"},rules:[{required:!0,message:"请输入卷名，至少2个字符",min:2,trigger:"blur"}]}),v(m(s.value,"isAdv")),...s.value.isAdv?[b("选项","driver_opts",{attrs:{placeholder:"选项",autosize:{minRows:5,maxRows:5},resize:"none",class:"w-[35rem]"}}),b("标签","labels",{attrs:{placeholder:"存储券标签，一行一个，例：key=value",autosize:{minRows:5,maxRows:5},resize:"none",class:"w-[35rem]"}}),b("备注","remark",{attrs:{placeholder:"备注",autosize:{minRows:5,maxRows:5},resize:"none",class:"w-[35rem]"}})]:[]]),submit:async(s,r,o)=>{await r(),(async(s,r)=>{e({request:a({data:JSON.stringify({name:s.value.name,driver:s.value.driver,driver_opts:s.value.driver_opts,labels:s.value.labels,remark:s.value.remark})}),message:!0,loading:"正在设置网络...",success:({status:s})=>{s&&(_.value=!0,r())}})})(s,i)}});return o({onConfirm:x}),(s,e)=>(n(),u("div",f,[d(c(w))]))}}),[["__scopeId","data-v-b0e910cc"]]);export{w as default};
