import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{_ as a}from"./public.js?v=1764233927359";import{o as l}from"./page_layout.js?v=1764233927359";import{c as t,a as s}from"./index88.js?v=1764233927359";import{k as u,P as r,r as n,e as i,a2 as p,V as o,a3 as _,W as d,R as x,an as m,U as v,j as c,S as b,a4 as g}from"./vue.js?v=1764233927359";import{dR as f,dT as y,dY as k,au as $}from"./naive.js?v=1764233927359";import"./common.js?v=1764233927359";import"./__commonjsHelpers__.js?v=1764233927359";import"./index.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang5.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang12.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang8.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang17.js?v=1764233927359";import"./site.js?v=1764233927359";const R={key:0},j={key:1},W=u({__name:"index",props:{data:{}},setup(u,{expose:W}){const w=u,{getList:P}=w.data,{t:h}=r(),U=n(null),q=i({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}),P()}}),(t,s)=>{const u=k,r=y,n=f,i=$,W=l,w=a,P=e;return o(),p(P,{class:"p-20px",ref_key:"formRef",ref:U,model:v(q),rules:D},{default:_(()=>[d(n,{label:t.$t("WP.Remote.index_2")},{default:_(()=>[d(r,{value:v(q).type,"onUpdate:value":s[0]||(s[0]=e=>v(q).type=e)},{default:_(()=>[d(u,{label:t.$t("WP.Remote.index_4"),value:2},null,8,["label"]),d(u,{label:t.$t("WP.Remote.index_3"),value:1},null,8,["label"])]),_:1},8,["value"])]),_:1},8,["label"]),d(n,{label:t.$t("WP.Config.index_1"),path:"url"},{default:_(()=>[d(i,{class:"w-300px!",value:v(q).url,"onUpdate:value":s[1]||(s[1]=e=>v(q).url=e),placeholder:t.$t("Waf.Rules.index_53")},null,8,["value","placeholder"])]),_:1},8,["label"]),1==v(q).type?(o(),x("div",R,[d(n,{label:t.$t("Site.Lable.index_24"),path:"username"},{default:_(()=>[d(i,{class:"w-300px!",value:v(q).username,"onUpdate:value":s[2]||(s[2]=e=>v(q).username=e),placeholder:t.$t("Database.index_13")},null,8,["value","placeholder"])]),_:1},8,["label"]),d(n,{label:t.$t("Site.Lable.index_27"),path:"password"},{default:_(()=>[d(i,{class:"w-300px!",value:v(q).password,"onUpdate:value":s[3]||(s[3]=e=>v(q).password=e),placeholder:t.$t("Database.index_14")},null,8,["value","placeholder"])]),_:1},8,["label"])])):(o(),x("div",j,[d(n,{label:t.$t("WP.Remote.index_5"),path:"key"},{default:_(()=>[d(i,{class:"w-300px!",value:v(q).key,"onUpdate:value":s[4]||(s[4]=e=>v(q).key=e),placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},null,8,["value"])]),_:1},8,["label"]),d(n,{label:t.$t("WP.Remote.index_6"),path:"token"},{default:_(()=>[d(i,{class:"w-300px!",value:v(q).token,"onUpdate:value":s[5]||(s[5]=e=>v(q).token=e),placeholder:t.$t("WP.Remote.index_7")},null,8,["value","placeholder"])]),_:1},8,["label"])])),2==v(q).type?(o(),p(w,{key:2,class:"ml-15px"},{default:_(()=>[c(g(t.$t("WP.Remote.index_8"))+": ",1),b("li",null,[c(" 1. "+g(t.$t("Ftp.Label.index_11"))+" ",1),d(W,{href:"https://wordpress.org/plugins/aapanel-wp-toolkit/",target:"_blank"},{default:_(()=>[c(g(t.$t("WP.Remote.index_9")),1)]),_:1})]),b("li",null,"2. "+g(t.$t("WP.Remote.index_10")),1),b("li",null,"3. "+g(t.$t("WP.Remote.index_11")),1),b("li",null,"4. "+g(t.$t("WP.Remote.index_12")),1),b("li",null,"5. "+g(t.$t("WP.Remote.index_13")),1),b("li",null,"6. "+g(t.$t("WP.Remote.index_14")),1)]),_:1})):m("",!0)]),_:1},8,["model"])}}});export{W as default};
