import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{_ as a}from"./public.js?v=1753954525509";import{o as l}from"./page_layout.js?v=1753954525509";import{c as t,a as s}from"./index87.js?v=1753954525509";import{k as r,P as u,r as i,e as n,U as p,a1 as o,a2 as _,Q as d,X as x,V as m,j as v,a3 as c,W as b,al as g}from"./vue.js?v=1753954525509";import{cJ as f,cE as y,cA as k,aq as $}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./index.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang5.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang11.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang17.js?v=1753954525509";import"./site.js?v=1753954525509";const j={key:0},W={key:1},w=r({__name:"index",props:{data:{}},setup(r,{expose:w}){const P=r,{getList:R}=P.data,{t:h}=u(),U=i(null),q=n({url:"",type:2,username:"",password:"",key:"",token:""}),D={url:{trigger:["blur","input"],message:h("Database.form.index_16"),required:!0},username:{required:!0,message:h("Database.form.index_16"),trigger:["input","blur"]},password:{required:!0,trigger:["blur","input"],message:h("Database.form.index_17")},key:{required:!0,trigger:["blur","input"],message:h("WP.Remote.index_15")},token:{required:!0,trigger:["blur","input"],message:h("WP.Remote.index_16")}};return w({onConfirm:async()=>{var e;await(null==(e=U.value)?void 0:e.validate()),1==q.type?await t({login_url:q.url,username:q.username,password:q.password}):await s({login_url:q.url,security_key:q.key,security_token:q.token}),R()}}),(t,s)=>{const r=f,u=y,i=k,n=$,w=l,P=a,R=e;return p(),o(R,{class:"p-20px",ref_key:"formRef",ref:U,model:x(q),rules:D},{default:_((()=>[d(i,{label:t.$t("WP.Remote.index_2")},{default:_((()=>[d(u,{value:x(q).type,"onUpdate:value":s[0]||(s[0]=e=>x(q).type=e)},{default:_((()=>[d(r,{label:t.$t("WP.Remote.index_4"),value:2},null,8,["label"]),d(r,{label:t.$t("WP.Remote.index_3"),value:1},null,8,["label"])])),_:1},8,["value"])])),_:1},8,["label"]),d(i,{label:t.$t("WP.Config.index_1"),path:"url"},{default:_((()=>[d(n,{class:"w-300px!",value:x(q).url,"onUpdate:value":s[1]||(s[1]=e=>x(q).url=e),placeholder:t.$t("Waf.Rules.index_53")},null,8,["value","placeholder"])])),_:1},8,["label"]),1==x(q).type?(p(),m("div",j,[d(i,{label:t.$t("Site.Lable.index_24"),path:"username"},{default:_((()=>[d(n,{class:"w-300px!",value:x(q).username,"onUpdate:value":s[2]||(s[2]=e=>x(q).username=e),placeholder:t.$t("Database.index_13")},null,8,["value","placeholder"])])),_:1},8,["label"]),d(i,{label:t.$t("Site.Lable.index_27"),path:"password"},{default:_((()=>[d(n,{class:"w-300px!",value:x(q).password,"onUpdate:value":s[3]||(s[3]=e=>x(q).password=e),placeholder:t.$t("Database.index_14")},null,8,["value","placeholder"])])),_:1},8,["label"])])):(p(),m("div",W,[d(i,{label:t.$t("WP.Remote.index_5"),path:"key"},{default:_((()=>[d(n,{class:"w-300px!",value:x(q).key,"onUpdate:value":s[4]||(s[4]=e=>x(q).key=e),placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},null,8,["value"])])),_:1},8,["label"]),d(i,{label:t.$t("WP.Remote.index_6"),path:"token"},{default:_((()=>[d(n,{class:"w-300px!",value:x(q).token,"onUpdate:value":s[5]||(s[5]=e=>x(q).token=e),placeholder:t.$t("WP.Remote.index_7")},null,8,["value","placeholder"])])),_:1},8,["label"])])),2==x(q).type?(p(),o(P,{key:2,class:"ml-15px"},{default:_((()=>[v(c(t.$t("WP.Remote.index_8"))+": ",1),b("li",null,[v(" 1. "+c(t.$t("Ftp.Label.index_11"))+" ",1),d(w,{href:"https://wordpress.org/plugins/aapanel-wp-toolkit/",target:"_blank"},{default:_((()=>[v(c(t.$t("WP.Remote.index_9")),1)])),_:1})]),b("li",null,"2. "+c(t.$t("WP.Remote.index_10")),1),b("li",null,"3. "+c(t.$t("WP.Remote.index_11")),1),b("li",null,"4. "+c(t.$t("WP.Remote.index_12")),1),b("li",null,"5. "+c(t.$t("WP.Remote.index_13")),1),b("li",null,"6. "+c(t.$t("WP.Remote.index_14")),1)])),_:1})):g("",!0)])),_:1},8,["model"])}}});export{w as default};
