import{m as u,aK as c,at as r,au as m,h as f,cR as d}from"./index-BTglIPU2.js?v=1773287522785";import{u as S}from"./useModal-De_33DuC.js?v=1773287522785";import{R as p}from"./vue-core-DJjvd5ZC.js?v=1773287522785";const k=()=>{const{t:i}=p();return{setSiteStatus:(e,t)=>{f({title:"".concat(i(e==="1"?"Site.PHP.index_21_2":"Site.PHP.index_21_3")," ").concat(i("Site.PHP.index_21_1",[t.name])),content:i(e==="1"?"Site.PHP.index_22":"Site.PHP.index_23"),onConfirm:async()=>{await d(e==="1",{id:t.id,name:t.name}),t.status=e}})},openMonitor:async e=>{if(await c({source:142}),await r("monitor"),m({name:"monitor",title:"Website statistics-v2",admin:!0}),!e)return;const t=setInterval(()=>{if(window.document.getElementsByClassName("layui-layer-page")[0]){clearInterval(t);let n=!1,s=!1,o=!1;const l=setInterval(()=>{if(!n){const a=document.querySelector('[data-name="request"]');a&&(a.click(),n=!0)}if(!s){const a=document.querySelector('.search-type [data-name="l30"]')||document.querySelector('[data-name="l30"]');a&&(a.click(),s=!0)}o||document.querySelectorAll(".mt_select_list li").forEach(a=>{a.getAttribute("data-name")===e&&(a.click(),o=!0)}),n&&s&&o&&clearInterval(l)},50)}},50)},openSiteWaf:async e=>{const t=u.loading("Loading, please wait...");try{await c({source:216}),await r("btwaf"),S({row:{siteName:e}})}finally{t.close()}}}};export{k as u};
