import{n as e,Q as t,M as s,u as a,b2 as i,an as n,q as l,ao as o,ap as r}from"./utils-lib.js?v=1761009159";import{_ as p}from"./index105.js?v=1761009159";import{_ as m}from"./index.vue_vue_type_script_setup_true_lang6.js?v=1761009159";import{B as u}from"./index134.js?v=1761009159";import{u as d}from"./index143.js?v=1761009159";import{j as c,r as _,c as f,s as v,w as g,e as y,C as b,q as x,n as j,v as h,x as T,y as I,B as S,z as k}from"./base-lib.js?v=1761009159";import{f as w}from"./validator.js?v=1761009159";import"./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang.js?v=1761009159";import{a as B,d as C,g as L,u as O}from"./column.js?v=1761009159";import{b as E,d as R,e as P,f as M,h as q,i as A,u as D,a as H,l as V,j as z}from"./useController6.js?v=1761009159";import{u as J,S as N}from"./useStore4.js?v=1761009159";const{activeType:F,isRefreshList:G}=J(),{addGeneralProject:Q,setSiteInfo:K}=N(),U=()=>{e({title:"添加HTML项目",area:62,component:()=>t(()=>import("./index376.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),showFooter:!0})},W=(s,a="")=>{K(s,a),e({title:"HTML项目管理["+s.name+"] -- 添加时间["+s.addtime+"]",area:[84,72],component:()=>t(()=>import("./index377.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)})},X=(e,t)=>{w({type:"dir",path:e,change:e=>{t&&t(e)}})},Y=async e=>{var t;try{const a={...e,port:80};-1!==a.webname.split("\n")[0].indexOf(":")&&(a.port=a.webname.split("\n")[0].split(":")[1]);let i=a.webname.split("\n").filter(e=>e.length).slice(1);a.webname=JSON.stringify({domain:a.webname.split("\n")[0],domainlist:i,count:i.length}),a.ftp||(delete a.ftp_username,delete a.ftp_password);const n=await Q(a);return(null==(t=null==n?void 0:n.data)?void 0:t.siteStatus)?(G.value=!0,s.success("添加成功"),!0):(s.error(n.msg),!1)}catch(a){}},Z=c("SITE-HTML-STORE",()=>({pluginInfo:_({})})),$=f({__name:"index",setup(e){a();const{getSiteList:s}=N(),{activeType:c,isRefreshList:_}=v(N()),{pluginInfo:f}=v(Z());g(P,e=>{(null==e?void 0:e.pluginInfo)&&(f.value=e.pluginInfo)},{immediate:!0,deep:!0});const{BtOperation:w}=i({options:[{type:"button",label:"添加项目",active:!0,onClick:U},{type:"custom",render:()=>y(u,{class:"ml-1rem",isRequest:!1,pluginInfo:f.value},null)}]}),J=d({key:"type_id",name:"PHP分类",options:()=>[{label:"全部分类",value:"all"}],event:q,ignore:["0"],field:"type_name"}),F=r([D(),H({classList:z}),{label:"删除项目",value:"delete",event:V}]),{BtTable:G,BtSearch:Q,BtRefresh:K,BtPage:X,BtColumn:Y,BtTableCategory:$,BtBatch:ee,refresh:te}=n({request:e=>{const{type_id:t,...a}=e;return s({data:JSON.stringify({...a,type_id:l(t)||"all"===t?"":t})})},columns:[B(),E({onClick:e=>W(e)}),C(),L({table:"sites",width:200}),R({onClick:e=>W(e,"ssl")}),O([{title:"设置",onClick:e=>W(e)},{title:"删除",onClick:e=>A(e)}])],extension:[J,F,o(_)],empty:()=>y("span",null,[b("您的列表为空，您可以"),y("span",{class:"bt-link",onClick:U},[b("添加一个项目")])])});return x(()=>{j(()=>{t(()=>import("./index376.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),t(()=>import("./index377.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)})}),(e,t)=>{const s=p;return h(),T("div",null,[y(m,{ref_key:"envRef",ref:P,onInit:I(te)},null,8,["onInit"]),y(s,null,{"header-left":S(()=>[y(I(w)),k("div",{class:"flex items-center ml-1rem",onClick:t[0]||(t[0]=(...e)=>I(M)&&I(M)(...e))},t[1]||(t[1]=[k("i",{class:"svgtofont-desired text-medium"},null,-1),k("span",{class:"bt-link"},"需求反馈",-1)]))]),"header-right":S(()=>[y(I($),{class:"!w-[200px] mr-[10px]"}),y(I(Q),{class:"mr-[10px]",placeholder:"请输入项目名称或备注"}),y(I(K),{class:"mr-[10px]"}),y(I(Y))]),content:S(()=>[y(I(G))]),"footer-left":S(()=>[y(I(ee))]),"footer-right":S(()=>[y(I(X))]),_:1})])}}}),ee=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"}));export{Y as a,ee as i,X as o};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
