import{a4 as v,r as s,x as R}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{be as y,n as I,aN as b,i as h}from"./index-BTglIPU2.js?v=1773287522785";import{g as t}from"./naive-ui--dJnpVcV.js?v=1773287522785";const M=v("database",()=>{const o=s("mysql"),n=s(!1),u=s(-1),r=s(-1),a=R([]),l=s(""),c=s(""),i=s({port:"888",setup:!1}),p=s(!0),g=s(!0),m=s(!0),d=s(!0),f=s(!0);return{type:o,isRefresh:n,install:p,delRemoteId:u,addRedisId:r,remoteList:a,backupPath:l,mysqlRoot:c,phpmyadmin:i,isInstallRedis:g,isInstallMongoDB:m,isInstallPgsql:d,isInstallPgsqlManager:f,resetPage:()=>{l.value="",a.value=[]},getRemote:async()=>{const{message:e}=await y({type:o.value});a.value=I(e)?e:[],p.value=a.value.length>0},getConfig:async()=>{const{message:e}=await b();h(e)&&(l.value=t(e,"backup_path",""),c.value=t(e,"mysql_root",""),i.value.setup=t(e,"phpmyadmin.setup",!1),g.value=t(e,"redis.setup",!1),m.value=t(e,"mongodb.setup",!1),d.value=t(e,"pgsql.setup",!1),f.value=t(e,"pgsql.pgsql_manager_setup",!1))},setType:e=>{o.value=e},setRefresh:e=>{n.value=e},setDelRemoteId:e=>{u.value=e},setAddRedisId:e=>{r.value=e}}});export{M as u};
