import{g as t,r as a,c as s,a as e}from"./useStore6.js?v=1761009159";import{u as r,P as o,M as n,aA as u}from"./utils-lib.js?v=1761009159";import{j as c,s as i,r as l}from"./base-lib.js?v=1761009159";const d=c("LOG-SSH-STORE",()=>{const c=l(!1),{payment:i}=r();return{isRefreshList:c,banCronJob:l(!1),getLogs:async a=>{try{if("ltd"!==i.value.authType)return{data:[],total:0,other:{}};const s=await o({loading:"正在获取日志数据，请稍后...",request:t({data:JSON.stringify(a)})});return!s.status&&s.msg?n.error(s.msg):{data:s.data.data,total:u(s.data.page),other:{}}}catch(s){return{data:[],total:0,other:{}}}},changeIpRules:async(t,e)=>{try{const r=await o({loading:"正在处理中，请稍后...",request:e?a(t):s(t)});return{msg:r.data[0].msg,status:r.data[0].status,data:{ip:r.data[0].ip}}}catch(r){return{msg:"操作失败",status:!1,data:{}}}},outLogs:async t=>{try{const{count:a,type:s}=t;let r={count:a,select:s};"all"===r.select&&delete r.select;const n=await o({loading:"正在导出日志，请稍后...",request:e({data:JSON.stringify(r)}),success:t=>{window.open("/download?filename="+t.data.output_file,"_blank","noopener,noreferrer")}});return{status:n.status,msg:"导出".concat(n.status?"成功":"失败")}}catch(a){return{status:!1,msg:"导出失败"}}}}}),g=()=>i(d());export{d as L,g as u};
