import { j as s } from "../../node_modules/react/jsx-runtime.js";
import * as o from "react";
import { Viewport as i, Root as c, Action as d, Close as n, Title as f, Description as l, Provider as v } from "../../node_modules/@radix-ui/react-toast/dist/index.js";
import { cva as g } from "../../node_modules/class-variance-authority/dist/index.js";
import { cn as a } from "../../utils/index.js";
import { Icon as u } from "../Icon/index.js";
const A = v, N = o.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ s.jsx(
  i,
  {
    ref: r,
    className: a(
      "fixed top-0 z-[100] flex items-center max-h-screen w-full flex-col-reverse ",
      t
    ),
    ...e
  }
));
N.displayName = i.displayName;
const $ = g(
  "group pointer-events-auto relative flex w-full max-w-[712px] items-center justify-start space-x-2 overflow-hidden rounded-md border mt-16 pl-4 py-5 pr-14 shadow-lg",
  {
    variants: {
      variant: {
        default: "border bg-interaction-success-subtle-default text-foreground border-interaction-success-default",
        destructive: "destructive group bg-interaction-critical-subtle-default text-destructive-foreground border border-interaction-critical-default"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
), y = o.forwardRef(({ className: t, variant: e, children: r, ...m }, p) => {
  const [b, x] = {
    default: ["check-circle", "text-interaction-success-default"],
    destructive: ["info-circle", "text-interaction-critical-default"]
  }[e ?? "default"];
  return /* @__PURE__ */ s.jsxs(
    c,
    {
      ref: p,
      className: a($({ variant: e }), t),
      ...m,
      children: [
        /* @__PURE__ */ s.jsx(u, { name: b, className: x, size: "sm" }),
        r
      ]
    }
  );
});
y.displayName = c.displayName;
const h = o.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ s.jsx(
  d,
  {
    ref: r,
    className: a(
      "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
      t
    ),
    ...e
  }
));
h.displayName = d.displayName;
const w = o.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ s.jsx(
  n,
  {
    ref: r,
    className: a(
      "absolute right-2 rounded-md p-1 focus:opacity-100 focus:outline-none focus:ring-2 flex items-center",
      t
    ),
    "toast-close": "",
    ...e,
    children: /* @__PURE__ */ s.jsx(u, { name: "x", size: "sm" })
  }
));
w.displayName = n.displayName;
const j = o.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ s.jsx(
  f,
  {
    ref: r,
    className: a("font-semibold", t),
    ...e
  }
));
j.displayName = f.displayName;
const R = o.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ s.jsx(
  l,
  {
    ref: r,
    className: a("opacity-90", t),
    ...e
  }
));
R.displayName = l.displayName;
export {
  y as Toast,
  h as ToastAction,
  w as ToastClose,
  R as ToastDescription,
  A as ToastProvider,
  j as ToastTitle,
  N as ToastViewport
};
