import{a4 as i,r,c as f,R as p,a0 as m}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{t as d,aN as g,i as u,h as P,aK as b,a3 as h}from"./index-BTglIPU2.js?v=1773287522785";import{c as v}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{b as w,c as C}from"./ftp-SrpKmV1S.js?v=1773287522785";const E=i("ftp",()=>{const s=d(),e=r(!1),t=r(""),a=r(21),n=r(!0),l=f(()=>s.address?"ftp://".concat(s.address,":").concat(a.value):"--");return{isRefresh:e,port:a,url:l,addPath:t,install:n,resetPage:()=>{t.value="",a.value=21,n.value=!0,e.value=!1},getConfig:async()=>{const{message:o}=await g();u(o)&&(a.value=o.ftpPort,t.value=o.sites_path,n.value=o["pure-ftpd"].setup)},setRefresh:o=>{e.value=o}}});function N(){const{t:s}=p();return{key:"password",title:s("Public.Table.Password"),minWidth:130,render:t=>m(v,{value:t.password},null)}}const{t:c}=h.global,F=()=>b({source:57}),$=()=>new Promise(async(s,e)=>{await F();const{message:t}=await w();if(u(t)){const{result:a}=t;if(a==="start"){s(t);return}}P({title:c("Ftp.Tool.Enable_T"),content:c("Ftp.Tool.Enable_C"),onConfirm:async()=>{await C(),setTimeout(()=>{s(t)},1e3)},onPublicClose:()=>{e(!1)}})});export{N as a,$ as c,E as u};
