import{_ as y}from"./index-DIKmrNCq.js?v=1773287522785";import{_ as v}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{p as w}from"./logs-CbT7wTGd.js?v=1773287522785";import"./index-BTglIPU2.js?v=1773287522785";import{u as h}from"./index-CsQ9XTTD.js?v=1773287522785";import{d as x}from"./index-TwdUTOyA.js?v=1773287522785";import{k as C,R as O,e as $,$ as N,Z as S,a0 as t,a9 as s,S as n,_ as k,aa as B}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as R,a6 as A}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-D2Bk83Ev.js?v=1773287522785";import"./useLoading-CZ2gSAW7.js?v=1773287522785";import"./index-BRQskX9P.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-BeO8Hyma.js?v=1773287522785";import"./useTableData-BmkIKQ_R.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-ChFCGdPN.js?v=1773287522785";import"./index-lEMZglLp.js?v=1773287522785";import"./firewall-jQIxKxfN.js?v=1773287522785";import"./logs.vue_vue_type_script_setup_true_lang-ETP00Jn6.js?v=1773287522785";const E={class:"p-16px"},L={class:"text-warning font-bold"},se=C({__name:"clear-log",props:{onRefresh:{type:Function,default:()=>{}}},setup(m,{expose:c}){const{t:o}=O(),u=h(),_=m,e=$({type:"access",time:"all"}),f=[{label:"Access",value:"access"},{label:"Error",value:"error"}],d=[{label:o("Public.All"),value:"all"},{label:o("Only retain 7 days of logs"),value:"7"},{label:o("Only retain 30 days of logs"),value:"30"},{label:o("Only retain 180 days of logs"),value:"180"}];return c({onConfirm:async()=>{await w({siteName:u.websiteName,logType:e.type,time_search:JSON.stringify(x(e.time))}),_.onRefresh()}}),(l,a)=>{const r=A,p=R,b=v,g=y;return N(),S("div",E,[t(b,null,{default:s(()=>[t(p,{label:l.$t("Home.index_54")},{default:s(()=>[t(r,{class:"w-200px",options:f,value:n(e).type,"onUpdate:value":a[0]||(a[0]=i=>n(e).type=i)},null,8,["value"])]),_:1},8,["label"]),t(p,{label:l.$t("Clear range")},{default:s(()=>[t(r,{class:"w-200px",options:d,value:n(e).time,"onUpdate:value":a[1]||(a[1]=i=>n(e).time=i),"consistent-menu-width":!1},null,8,["value"])]),_:1},8,["label"])]),_:1}),t(g,null,{default:s(()=>[k("li",L,B(l.$t("Cleaning up related logs may make troubleshooting more difficult; please proceed with caution.")),1)]),_:1})])}}});export{se as default};
