"use client";
import{a as f}from"./chunk-CRUBRFDA.js";import{e as N}from"./chunk-6VRSF35C.js";import{b as g}from"./chunk-3CFS53KS.js";import{d as C,e as h}from"./chunk-CLTGASR6.js";import{a as $,m as r}from"./chunk-3CHPBNY2.js";import{p as i,s as p}from"./chunk-KEPQUAOX.js";import x from"clsx";import{forwardRef as Q}from"react";import{css as J}from"@emotion/react";var W=r("div")(({theme:o})=>J`
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: ${o.zIndex.modal-1};
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(7px);
  `);import{jsx as w}from"react/jsx-runtime";var P=Q((o,a)=>{let{open:e,...t}=o;return w(f,{in:e,children:w(W,{ref:a,...t})})});P.displayName="Backdrop";var u=P;import{forwardRef as Z}from"react";import _ from"clsx";var V=$("EulModal",["backdrop","content","modal","open","root","header","body","footer","aside","section"]),l=o=>h("EulModal",{aside:["aside"],backdrop:["backdrop"],body:["body"],content:["content"],footer:["footer"],header:["header"],modal:["modal"],root:["root",o?.open&&"open"],section:["section"]}),X=V;var v=r(p)(({theme:o})=>i`
    display: flex;
    margin-right: -${o.spacing(8)};
    margin-left: -${o.spacing(8)};
  `);import{jsx as j}from"react/jsx-runtime";var H=Z((o,a)=>{let{children:e,className:t,sx:m,...s}=o,d=l();return j(v,{className:_(t,d.body),ref:a,...s,children:e})});H.displayName="ModalBody";var M=H;import{forwardRef as ro}from"react";import{faClose as ao,faCog as eo}from"@fortawesome/free-solid-svg-icons";import{FontAwesomeIcon as A}from"@fortawesome/react-fontawesome";import to from"clsx";var F=r(p)(({theme:o})=>i`
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: ${o.spacing(4)};
    margin-top: -${o.spacing(8)};
    margin-right: -${o.spacing(8)};
    margin-left: -${o.spacing(8)};
    border-bottom: 1px solid ${o.palette.background[500]};
  `);import{jsx as c,jsxs as E}from"react/jsx-runtime";var R=ro((o,a)=>{let{children:e,className:t,handleClose:m,handleConfig:s,sx:d,...n}=o,G=l();return E(F,{className:to(t,G.header),ref:a,...n,children:[e,E(p,{display:"flex",gap:1,children:[s?c(g,{onClick:s,size:"small",startIcon:c(A,{icon:eo}),variant:"secondary"}):null,m?c(g,{onClick:m,size:"small",startIcon:c(A,{icon:ao}),variant:"secondary"}):null]})]})});R.displayName="ModalHeader";var b=R;import{forwardRef as po}from"react";import lo from"clsx";var T=r(p)(({theme:o})=>i`
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: ${o.spacing(4)};
    margin-right: -${o.spacing(8)};
    margin-bottom: -${o.spacing(8)};
    margin-left: -${o.spacing(8)};
    border-top: 1px solid ${o.palette.background[500]};
  `);import{jsx as io}from"react/jsx-runtime";var z=po((o,a)=>{let{children:e,className:t,sx:m,...s}=o,d=l();return io(T,{className:lo(t,d.footer),ref:a,...s,children:e})});z.displayName="ModalFooter";var y=z;import{forwardRef as no}from"react";import fo from"clsx";var D=r(p)(({theme:o})=>i`
    display: flex;
    padding: ${o.spacing(4)};
    overflow-y: auto;
    border-left: 1px solid ${o.palette.background[500]};
    scrollbar-width: thin;
  `);import{jsx as co}from"react/jsx-runtime";var L=no((o,a)=>{let{children:e,className:t,sx:m,...s}=o,d=l();return co(D,{className:fo(t,d.aside),component:"aside",ref:a,...s,children:e})});L.displayName="ModalAside";var S=L;import{forwardRef as go}from"react";import uo from"clsx";var I=r(p)(({theme:o})=>i`
    display: flex;
    width: 100%;
    padding: ${o.spacing(4)};
    overflow-y: auto;
    scrollbar-width: thin;
  `);import{jsx as Mo}from"react/jsx-runtime";var U=go((o,a)=>{let{children:e,className:t,sx:m,...s}=o,d=l();return Mo(I,{className:uo(t,d.section),component:"section",ref:a,...s,children:e})});U.displayName="ModalSection";var B=U;import{css as bo}from"@emotion/react";var O=r("div")(({theme:o})=>bo`
    position: relative;
    z-index: ${o.zIndex.modal};
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: ${o.spacing(200)};
    padding: ${o.spacing(8)};
    margin: auto;
    background: ${o.palette.background[300]};
    border: 1px solid ${o.palette.background[400]};
    border-radius: ${o.spacing(4)};
    box-shadow: ${o.shadows[4]};
    backdrop-filter: blur(7px);

    > * {
      align-self: stretch;
    }
  `),q=r("div")`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: auto;
`;import{jsx as k}from"react/jsx-runtime";var So=o=>{let{children:a,className:e,onClose:t,open:m,...s}=o,d=C(s),n=l(o);return k(N,{...d,classes:{root:x(n.root)},className:x(e,n.modal),closeAfterTransition:!0,onClose:t,open:m,slotProps:{backdrop:{className:x(n.backdrop)}},slots:{backdrop:u,root:q},children:k(f,{in:m,children:k(O,{className:x(n.content),children:a})})})},Bo=Object.assign(So,{Aside:S,Body:M,Footer:y,Header:b,Section:B}),ko=Bo;export{X as a,ko as b};
