"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 _chunkN7CAZRGGcjs = require('./chunk-N7CAZRGG.cjs');var _chunkSWIYVNAYcjs = require('./chunk-SWIYVNAY.cjs');var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk3CNSKST2cjs = require('./chunk-3CNSKST2.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=_chunk3CNSKST2cjs.a.call(void 0, "EulToast",["root","alert","compact"]),T=o=>_chunk5KRCPBZRcjs.e.call(void 0, "EulToast",{alert:["alert"],compact:["compact"],root:[o.variant,"root"]}),a= exports.a =k;var _react3 = require('@emotion/react');var x=_chunk3CNSKST2cjs.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} {
      .${_chunkSWIYVNAYcjs.a.title}, .${_chunkSWIYVNAYcjs.a.description}, .${_chunkSWIYVNAYcjs.a.action} {
        font-size: ${o.spacing(3)};
      }
    }
  `);var _jsxruntime = require('react/jsx-runtime');var e=_react.forwardRef.call(void 0, ({alert:o,className:g,dismiss:$,duration:P=3e3,onDismiss:l,variant:y},S)=>{let p=T({variant:y}),[b,i]=_react.useState.call(void 0, !0),m=_react.useCallback.call(void 0, ()=>{i(!1),_optionalChain([l, 'optionalCall', _ => _()])},[i,l]);return _react.useEffect.call(void 0, ()=>{setTimeout(()=>{m()},P)},[]),b?_jsxruntime.jsxs.call(void 0, x,{className:_clsx2.default.call(void 0, g,p.root),ref:S,children:[$?_jsxruntime.jsx.call(void 0, _chunkN7CAZRGGcjs.b,{onClick:m,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, p.alert),children:_jsxruntime.jsx.call(void 0, _chunkSWIYVNAYcjs.b,{...o})})]}):null});e.defaultProps={variant:"normal"};e.displayName="Toast";var A=e;exports.a = a; exports.b = A;
