import{s as b,e as m,a as C,c as u,g as h,b as g,d as w,f as d,h as v,i as p,j as L,l as T,n as x,o as j}from"../chunks/scheduler.AtZRZ-7N.js";import{S as k,i as y}from"../chunks/index.kgFpNQDS.js";import{L as _}from"../chunks/LogService.L-mSVvLb.js";function E(f){let e,c="Пользовательские логи",o,a,t,i="Экспорт Excel",r,n;return{c(){e=m("h1"),e.textContent=c,o=C(),a=m("div"),t=m("button"),t.textContent=i,this.h()},l(s){e=u(s,"H1",{"data-svelte-h":!0}),h(e)!=="svelte-pofs8j"&&(e.textContent=c),o=g(s),a=u(s,"DIV",{class:!0});var l=w(a);t=u(l,"BUTTON",{class:!0,"data-svelte-h":!0}),h(t)!=="svelte-77urvm"&&(t.textContent=i),l.forEach(d),this.h()},h(){v(t,"class","btn variant-filled"),v(a,"class","flex space-x-2 items-center")},m(s,l){p(s,e,l),p(s,o,l),p(s,a,l),L(a,t),r||(n=T(t,"click",f[1]),r=!0)},p:x,i:x,o:x,d(s){s&&(d(e),d(o),d(a)),r=!1,n()}}}function S(f){let e,c;async function o(t){if(t==="json")await _.exportToJson(e,c);else if(t==="excel"){const i=await _.exportToExcel(e,c);if(i!=null){const r=window.URL.createObjectURL(i),n=document.createElement("a");n.href=r,n.download="logs.xlsx",document.body.appendChild(n),n.click(),n.remove()}}}return j(async()=>{}),[o,()=>o("excel")]}class $ extends k{constructor(e){super(),y(this,e,S,E,b,{})}}export{$ as component}; | |