import{t as W,h as L,Q as $,i as f}from"./index-BTglIPU2.js?v=1773287522785";import{u as b}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{a6 as N,a7 as R}from"./index-oaByoBTF.js?v=1773287522785";import{k as T,R as V,a6 as j,r as S,e as D,$ as m,Z as H,a0 as s,a9 as a,_ as c,aa as o,S as n,a8 as I,ak as M,j as x}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{ad as E,a0 as F,B as G,k as O,g as Q}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const Z={class:"p-20px"},q={class:"text-14px leading-22px"},z={class:"text-14px leading-22px"},A=["innerHTML"],te=T({__name:"index",props:{data:{}},setup(g){const{t:l}=V(),y=g,h=W(),{isPro:k}=j(h),{site:_}=y.data,{loading:v,setLoading:u}=b(!1),i=S(!1),e=D({status:!0,text:""}),C=()=>{L({title:l("WP.index_35"),content:l("WP.index_36"),onConfirm:async({hide:t})=>{if(!k.value){$({source:214});return}e.text="",i.value=!0,t();const{message:r}=await N({s_id:_.id});f(r)&&(e.text=r.result,e.status=!0,i.value=!1)}})},w=async()=>{e.text="",u(!0);try{const t=await R({s_id:_.id});e.status=!0,f(t.message)&&(e.text=t.message.result)}catch(t){e.status=!1,e.text=Q(t,"message.result","")}finally{u(!1)}};return(t,r)=>{const d=E,P=F,p=G,B=O;return m(),H("div",Z,[s(d,{type:"default",class:"mb-16px","show-icon":!1},{default:a(()=>[c("div",q,o(t.$t("WP.index_33")),1),c("div",z,o(t.$t("WP.index_37")),1)]),_:1}),n(e).text?(m(),I(d,{key:0,type:n(e).status?"success":"error"},{default:a(()=>[c("span",{innerHTML:n(e).text},null,8,A)]),_:1},8,["type"])):M("",!0),s(P,{class:"my-16px!"}),s(B,{class:"justify-evenly!"},{default:a(()=>[s(p,{type:"primary",onClick:w,loading:n(v)},{default:a(()=>[x(o(t.$t("WP.index_34")),1)]),_:1},8,["loading"]),s(p,{type:"info",onClick:C,loading:n(i)},{default:a(()=>[x(o(t.$t("WP.index_35")),1)]),_:1},8,["loading"])]),_:1})])}}});export{te as default};
