import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{_ as a}from"./public.js?v=1763625242172";import{o as l}from"./page_layout.js?v=1763625242172";import{c as t,a as s}from"./index88.js?v=1763625242172";import{k as u,P as r,r as n,e as i,R as p,a2 as o,a3 as _,X as d,V as x,S as m,j as v,a4 as c,U as b,an as g}from"./vue.js?v=1763625242172";import{dZ as f,dT as y,dP as k,au as $}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./index.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang5.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang12.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang8.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang17.js?v=1763625242172";import"./site.js?v=1763625242172";const j={key:0},P={key:1},R=u({__name:"index",props:{data:{}},setup(u,{expose:R}){const w=u,{getList:W}=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 R({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}),W()}}),(t,s)=>{const u=f,r=y,n=k,i=$,R=l,w=a,W=e;return p(),o(W,{class:"p-20px",ref_key:"formRef",ref:U,model:x(q),rules:D},{default:_((()=>[d(n,{label:t.$t("WP.Remote.index_2")},{default:_((()=>[d(r,{value:x(q).type,"onUpdate:value":s[0]||(s[0]=e=>x(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: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(n,{label:t.$t("Site.Lable.index_24"),path:"username"},{default:_((()=>[d(i,{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(n,{label:t.$t("Site.Lable.index_27"),path:"password"},{default:_((()=>[d(i,{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",P,[d(n,{label:t.$t("WP.Remote.index_5"),path:"key"},{default:_((()=>[d(i,{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(n,{label:t.$t("WP.Remote.index_6"),path:"token"},{default:_((()=>[d(i,{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(w,{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(R,{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{R as default};
