import{H as e}from"./database.js?v=20260328163632";import{B as a}from"./index85.js?v=20260328163632";import{l as s,K as t,dj as l,t as o,x as r}from"./utils-lib.js?v=20260328163632";import{u as i}from"./store.js?v=20260328163632";import{k as p,r as m,O as u,V as n,_ as d,Y as c}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";const f=p({__name:"index",setup(p,{expose:f}){const{isRefreshList:h}=i(),j=m({label:s("路径"),ruleKey:"path",rules:[t({message:s("请选择数据库文件路径"),trigger:["blur","input","change"]})],children:[{type:"custom",key:"path",render:()=>u(a,{modelValue:x.value.path,"onUpdate:modelValue":e=>x.value.path=e,onIconClick:()=>l({type:"file",callback:e=>x.value.path=e}),placeholder:s("请选择数据库文件路径"),width:"240px",icon:"el-folder-opened"},null)}]}),v=m({formAttrs:{labelWidth:100},formItems:[j.value]}),[b,x,_]=o(v);return f({onConfirm:async a=>{await _.value.validate(),r({loading:s("正在添加数据库，请稍后..."),request:e(x.value),message:!0,success:e=>{e.status&&(h.value=!0,a())}})}}),(e,a)=>(n(),d(c(b),{class:"p-20px"}))}});export{f as default};
