import{d}from"./index-D4ZMoJFe.js";const c=(e,r)=>{const t=/filename="?([^"]+)"?/i.exec(e||"");return(t==null?void 0:t[1])||r},b=(e,r)=>{var n,s;const t=new Blob([e.data],{type:((n=e.headers)==null?void 0:n["content-type"])||"application/octet-stream"}),a=window.URL.createObjectURL(t),o=document.createElement("a");o.href=a,o.download=c((s=e.headers)==null?void 0:s["content-disposition"],r),document.body.appendChild(o),o.click(),o.remove(),window.setTimeout(()=>window.URL.revokeObjectURL(a),1e4)},l=async({endpoint:e,params:r,type:t,fallbackName:a})=>{const o=await d.get(e,{params:{...r,export:t},responseType:"blob"});b(o,a)},p=e=>`rounded-xl border px-4 py-2.5 text-sm font-semibold transition ${e?"border-amber-300 bg-amber-50 text-amber-700":"border-slate-200 bg-white text-slate-600 hover:border-slate-300 hover:text-slate-900"}`;export{b as d,l as e,p as r};
