"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
var _chunkVAPCFP6Kcjs = require('./chunk-VAPCFP6K.cjs');var _chunkG6HMMAVXcjs = require('./chunk-G6HMMAVX.cjs');var _chunkX26E67JFcjs = require('./chunk-X26E67JF.cjs');var _chunkQLDZ7HKUcjs = require('./chunk-QLDZ7HKU.cjs');var _chunk5NXYDZPPcjs = require('./chunk-5NXYDZPP.cjs');var _react = require('react');var _freesolidsvgicons = require('@fortawesome/free-solid-svg-icons');var _reactfontawesome = require('@fortawesome/react-fontawesome');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var k=_chunkQLDZ7HKUcjs.a.call(void 0, "EulToast",["root","alert","compact"]),x=o=>_chunkX26E67JFcjs.e.call(void 0, "EulToast",{alert:["alert"],compact:["compact"],root:[o.variant,"root"]}),a= exports.a =k;var _react3 = require('@emotion/react');var C=_chunkQLDZ7HKUcjs.m.call(void 0, (0, _chunk5NXYDZPPcjs.s))(({theme:o})=>_react3.css`
    position: fixed;
    top: ${o.spacing(4)};
    right: ${o.spacing(4)};
    z-index: ${o.zIndex.modal};
    display: flex;
    flex-direction: column;
    gap: ${o.spacing(1)};
    align-items: flex-end;
    width: ${o.spacing(75)};

    .${a.alert} {
      background: ${o.palette.background[400]};
    }

    &.${a.compact} {
      .${_chunkG6HMMAVXcjs.a.title}, .${_chunkG6HMMAVXcjs.a.description}, .${_chunkG6HMMAVXcjs.a.action} {
        font-size: ${o.spacing(3)};
      }
    }
  `);var _jsxruntime = require('react/jsx-runtime');var e=_react.forwardRef.call(void 0, ({alert:o,className:$,dismiss:y,duration:p=3e3,onDismiss:l,variant:P},S)=>{let i=x({variant:P}),[b,m]=_react.useState.call(void 0, !0),f=_react.useCallback.call(void 0, ()=>{m(!1),_optionalChain([l, 'optionalCall', _ => _()])},[m,l]);return _react.useEffect.call(void 0, ()=>{p!==0&&setTimeout(()=>{f()},p)},[]),b?_jsxruntime.jsxs.call(void 0, C,{className:_clsx2.default.call(void 0, $,i.root),ref:S,children:[y?_jsxruntime.jsx.call(void 0, _chunkVAPCFP6Kcjs.b,{onClick:f,size:"small",startIcon:_jsxruntime.jsx.call(void 0, _reactfontawesome.FontAwesomeIcon,{icon:_freesolidsvgicons.faClose}),variant:"ghost"}):null,_jsxruntime.jsx.call(void 0, _chunk5NXYDZPPcjs.s,{className:_clsx2.default.call(void 0, i.alert),children:_jsxruntime.jsx.call(void 0, _chunkG6HMMAVXcjs.b,{...o})})]}):null});e.defaultProps={variant:"normal"};e.displayName="Toast";var A=e;exports.a = a; exports.b = A;
