import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{_ as U}from"./index-DIKmrNCq.js?v=1773287522785";import{_ as q}from"./index-BTglIPU2.js?v=1773287522785";import{c as B,a as L}from"./index-DLQT41Sv.js?v=1773287522785";import{k as N,R as S,r as V,e as K,$ as d,a8 as b,a9 as r,a0 as a,S as l,Z as g,j as _,aa as s,_ as i,ak as j}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as E,a3 as F,ag as I,b as T}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-HxsqzSKU.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-D2Bk83Ev.js?v=1773287522785";import"./useLoading-CZ2gSAW7.js?v=1773287522785";import"./useTableData-BmkIKQ_R.js?v=1773287522785";import"./useTableColumns-DDeyYvje.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-5NptluQv.js?v=1773287522785";const Z={key:0},z={key:1},xe=N({__name:"index",props:{data:{}},setup(k,{expose:c}){const v=k,{getList:$}=v.data,{t:p}=S(),x=V(null),t=K({url:"",type:2,username:"",password:"",key:"",token:""}),y={url:{trigger:["blur","input"],message:p("Database.form.index_16"),required:!0},username:{required:!0,message:p("Database.form.index_16"),trigger:["input","blur"]},password:{required:!0,trigger:["blur","input"],message:p("Database.form.index_17")},key:{required:!0,trigger:["blur","input"],message:p("WP.Remote.index_15")},token:{required:!0,trigger:["blur","input"],message:p("WP.Remote.index_16")}},R=()=>({login_url:t.url,username:t.username,password:t.password}),W=()=>({login_url:t.url,security_key:t.key,security_token:t.token});return c({onConfirm:async()=>{var e;await((e=x.value)==null?void 0:e.validate()),t.type==1?await B(R()):await L(W()),$()}}),(e,o)=>{const f=I,w=F,u=E,m=T,P=q,h=U,C=D;return d(),b(C,{class:"p-20px",ref_key:"formRef",ref:x,model:l(t),rules:y},{default:r(()=>[a(u,{label:e.$t("WP.Remote.index_2")},{default:r(()=>[a(w,{value:l(t).type,"onUpdate:value":o[0]||(o[0]=n=>l(t).type=n)},{default:r(()=>[a(f,{label:e.$t("WP.Remote.index_4"),value:2},null,8,["label"]),a(f,{label:e.$t("WP.Remote.index_3"),value:1},null,8,["label"])]),_:1},8,["value"])]),_:1},8,["label"]),a(u,{label:e.$t("WP.Config.index_1"),path:"url"},{default:r(()=>[a(m,{class:"w-300px!",value:l(t).url,"onUpdate:value":o[1]||(o[1]=n=>l(t).url=n),placeholder:e.$t("Waf.Rules.index_53")},null,8,["value","placeholder"])]),_:1},8,["label"]),l(t).type==1?(d(),g("div",Z,[a(u,{label:e.$t("Site.Lable.index_24"),path:"username"},{default:r(()=>[a(m,{class:"w-300px!",value:l(t).username,"onUpdate:value":o[2]||(o[2]=n=>l(t).username=n),placeholder:e.$t("Database.index_13")},null,8,["value","placeholder"])]),_:1},8,["label"]),a(u,{label:e.$t("Site.Lable.index_27"),path:"password"},{default:r(()=>[a(m,{class:"w-300px!",value:l(t).password,"onUpdate:value":o[3]||(o[3]=n=>l(t).password=n),placeholder:e.$t("Database.index_14")},null,8,["value","placeholder"])]),_:1},8,["label"])])):(d(),g("div",z,[a(u,{label:e.$t("WP.Remote.index_5"),path:"key"},{default:r(()=>[a(m,{class:"w-300px!",value:l(t).key,"onUpdate:value":o[4]||(o[4]=n=>l(t).key=n),placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},null,8,["value"])]),_:1},8,["label"]),a(u,{label:e.$t("WP.Remote.index_6"),path:"token"},{default:r(()=>[a(m,{class:"w-300px!",value:l(t).token,"onUpdate:value":o[5]||(o[5]=n=>l(t).token=n),placeholder:e.$t("WP.Remote.index_7")},null,8,["value","placeholder"])]),_:1},8,["label"])])),l(t).type==2?(d(),b(h,{key:2,class:"ml-15px"},{default:r(()=>[_(s(e.$t("WP.Remote.index_8"))+": ",1),i("li",null,[_(" 1. "+s(e.$t("Ftp.Label.index_11"))+" ",1),a(P,{href:"https://wordpress.org/plugins/yakpanel-wp-toolkit/",target:"_blank"},{default:r(()=>[_(s(e.$t("WP.Remote.index_9")),1)]),_:1})]),i("li",null,"2. "+s(e.$t("WP.Remote.index_10")),1),i("li",null,"3. "+s(e.$t("WP.Remote.index_11")),1),i("li",null,"4. "+s(e.$t("WP.Remote.index_12")),1),i("li",null,"5. "+s(e.$t("WP.Remote.index_13")),1),i("li",null,"6. "+s(e.$t("WP.Remote.index_14")),1)]),_:1})):j("",!0)]),_:1},8,["model"])}}});export{xe as default};
