import{j as e,N as d}from"./index-B-YXshIJ.js";import{h as x,e as u}from"./Icons-C9UDsqhh.js";import{c as f,u as p}from"./dialog-hooks-DGvq_AFU.js";const h=({children:a,isOpen:r=!1,close:l,heading:o,downloadUrl:t,onClosed:n})=>{const{dialogProps:i,mountDialog:c,dialogClassName:m}=p({isOpen:r,onClosed:n,onOpenStart:s=>{setTimeout(()=>{s.classList.remove("translate-x-full"),s.classList.remove("translate-x-0")},0)},onCloseStart:s=>{s.classList.add("translate-x-full"),s.classList.add("translate-x-0")}});return c?e.jsxs("dialog",{...i,className:d("w-[700px] max-w-[80%] h-screen max-h-screen m-0","translate-x-full duration-200 p-0","grid grid-flow-row grid-rows-[auto_1fr]",m),style:{inset:"unset",top:0,right:0},children:[e.jsxs("div",{className:["max-h-screen grid grid-flow-col grid-cols-[1fr_min-content_min-content]","pl-4 pr-2 py-3 border-b border-theme-seperator items-center"].join(" "),children:[e.jsx("h1",{className:"font-semibold text-xl flex items-center",children:o}),e.jsx("div",{children:t?e.jsxs("a",{href:t,download:!0,className:"inline-flex items-center link-text p-2 text-sm font-medium whitespace-nowrap",children:[e.jsx(x,{className:"inline-block mr-2"}),"Download XLSX"]}):null}),e.jsx("button",{onClick:l,className:"p-2 self-start","aria-label":"Close dialog",children:e.jsx(u,{})})]}),e.jsx("div",{className:"overflow-y-auto",children:a})]}):null},N=f(h);export{N as u};
