import { jsx } from 'react/jsx-runtime';
import * as React from 'react';
import { T as Toaster$2 } from '../index-D_roZz8G.js';
import { L as LoaderCircle } from '../loader-circle-DycHUAWN.js';
import { c as createLucideIcon } from '../createLucideIcon-C8ycilSN.js';
import { T as TriangleAlert, I as Info } from '../triangle-alert-PXnNWQy_.js';
import 'react-dom';

/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */


const __iconNode$1 = [
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
];
const CircleCheck = createLucideIcon("circle-check", __iconNode$1);

/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */


const __iconNode = [
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
  [
    "path",
    {
      d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",
      key: "2d38gg"
    }
  ],
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
];
const OctagonX = createLucideIcon("octagon-x", __iconNode);

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.createContext(void 0),U={setTheme:e=>{},themes:[]},z=()=>{var e;return (e=React.useContext(x))!=null?e:U};React.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.createElement("script",{...w,suppressHydrationWarning:true,nonce:typeof window=="undefined"?d:"",dangerouslySetInnerHTML:{__html:`(${M.toString()})(${p})`}})});

const Toaster$1 = ({ ...props }) => {
    const { theme = "system" } = z();
    return (jsx(Toaster$2, { theme: theme, className: "toaster group", icons: {
            success: (jsx(CircleCheck, { className: "size-4" })),
            info: (jsx(Info, { className: "size-4" })),
            warning: (jsx(TriangleAlert, { className: "size-4" })),
            error: (jsx(OctagonX, { className: "size-4" })),
            loading: (jsx(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) => (jsx(Toaster$1, { toastOptions: {
        classNames: {
            toast: "cn-toast",
            success: "!bg-success !text-success-foreground !border-success/30",
            error: "!bg-error !text-error-foreground !border-error/30",
            warning: "!bg-warning !text-warning-foreground !border-warning/30",
            info: "!bg-info !text-info-foreground !border-info/30",
        },
    }, ...props }));

export { Toaster };
//# sourceMappingURL=Sonner.js.map
