'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var index = require('../index-CPmGpPzg.js');
var loaderCircle = require('../loader-circle-Bw7zP2Gn.js');
var triangleAlert = require('../triangle-alert-CC-cck8p.js');
var info = require('../info-DGfDptn1.js');
require('../createLucideIcon-D0tRgV6l.js');
require('react-dom');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var React__namespace = /*#__PURE__*/_interopNamespace(React);

var M=(e,i,s,u,m,a,l,h)=>{let d=document.documentElement,w=["light","dark"];function p(n){(Array.isArray(e)?e:[e]).forEach(y=>{let k=y==="class",S=k&&a?m.map(f=>a[f]||f):m;k?(d.classList.remove(...S),d.classList.add(a&&a[n]?a[n]:n)):d.setAttribute(y,n);}),R(n);}function R(n){h&&w.includes(n)&&(d.style.colorScheme=n);}function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(u)p(u);else try{let n=localStorage.getItem(i)||s,y=l&&n==="system"?c():n;p(y);}catch(n){}};var x=React__namespace.createContext(void 0),U={setTheme:e=>{},themes:[]},z=()=>{var e;return (e=React__namespace.useContext(x))!=null?e:U};React__namespace.memo(({forcedTheme:e,storageKey:i,attribute:s,enableSystem:u,enableColorScheme:m,defaultTheme:a,value:l,themes:h,nonce:d,scriptProps:w})=>{let p=JSON.stringify([s,i,a,e,h,l,u,m]).slice(1,-1);return React__namespace.createElement("script",{...w,suppressHydrationWarning:true,nonce:typeof window=="undefined"?d:"",dangerouslySetInnerHTML:{__html:`(${M.toString()})(${p})`}})});

const Toaster$1 = ({ ...props }) => {
  const { theme = "system" } = z();
  return /* @__PURE__ */ jsxRuntime.jsx(
    index.Toaster,
    {
      theme,
      className: "toaster group",
      icons: {
        success: /* @__PURE__ */ jsxRuntime.jsx(index.CircleCheck, { className: "size-4" }),
        info: /* @__PURE__ */ jsxRuntime.jsx(info.Info, { className: "size-4" }),
        warning: /* @__PURE__ */ jsxRuntime.jsx(triangleAlert.TriangleAlert, { className: "size-4" }),
        error: /* @__PURE__ */ jsxRuntime.jsx(index.OctagonX, { className: "size-4" }),
        loading: /* @__PURE__ */ jsxRuntime.jsx(loaderCircle.LoaderCircle, { className: "size-4 animate-spin" })
      },
      style: {
        "--normal-bg": "var(--popover)",
        "--normal-text": "var(--popover-foreground)",
        "--normal-border": "var(--border)",
        "--border-radius": "var(--radius)"
      },
      toastOptions: {
        classNames: {
          toast: "cn-toast"
        }
      },
      ...props
    }
  );
};

const Toaster = (props) => /* @__PURE__ */ jsxRuntime.jsx(
  Toaster$1,
  {
    toastOptions: {
      classNames: {
        toast: "cn-toast",
        success: "!bg-success-solid !text-success-solid-foreground !border-success-solid/30",
        error: "!bg-error-solid !text-error-solid-foreground !border-error-solid/30",
        warning: "!bg-warning-solid !text-warning-solid-foreground !border-warning-solid/30",
        info: "!bg-info-solid !text-info-solid-foreground !border-info-solid/30"
      }
    },
    ...props
  }
);

exports.Toaster = Toaster;
//# sourceMappingURL=Sonner.js.map
