import{r as x,R as p,X as l,j as n,N as h}from"./index-B-YXshIJ.js";import{c as y,u as v}from"./dialog-hooks-DGvq_AFU.js";function d(){return d=Object.assign||function(e){for(var s=1;s<arguments.length;s++){var r=arguments[s];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},d.apply(this,arguments)}function j(e,s){if(e==null)return{};var r=w(e,s),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],!(s.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function w(e,s){if(e==null)return{};var r={},t=Object.keys(e),o,a;for(a=0;a<t.length;a++)o=t[a],!(s.indexOf(o)>=0)&&(r[o]=e[o]);return r}var m=x.forwardRef(function(e,s){var r=e.color,t=r===void 0?"currentColor":r,o=e.size,a=o===void 0?24:o,c=j(e,["color","size"]);return p.createElement("svg",d({ref:s,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),p.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),p.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});m.propTypes={color:l.string,size:l.oneOfType([l.string,l.number])};m.displayName="X";const b=m,O=({isOpen:e=!1,close:s,heading:r,subheading:t,children:o,className:a,onClosed:c})=>{const{dialogProps:f,mountDialog:u,dialogClassName:g}=v({isOpen:e,onClosed:c,onOpenStart:i=>{setTimeout(()=>{i.classList.add("opacity-100"),i.classList.add("translate-y-0")},0)},onCloseStart:i=>{i.classList.remove("translate-y-0"),i.classList.remove("opacity-100")}});return u?n.jsxs("dialog",{...f,className:h(g,"rounded-lg shadow-2xl m-auto p-0 -translate-y-10 opacity-0 transition-[opacity,transform]","grid grid-flow-row grid-rows-[max-content_1fr] h-full",a),children:[n.jsxs("header",{className:"grid grid-flow-col grid-cols-[1fr_30px] pl-6 pr-3 py-4 items-start border-b border-theme-seperator",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-xl font-medium",children:r}),t?n.jsx("div",{className:"col-span-2 text-theme-helptext text-sm",children:t}):null]}),n.jsx("button",{onClick:s,className:"text-theme-icon","aria-label":"Close dialog",children:n.jsx(b,{size:24})})]}),o]}):null},L=y(O);export{b as X,L as u};
