"use client";
import { jsxs as e, jsx as t } from "react/jsx-runtime";
import { c as r } from "./cn-Bhsu1vx2.js";
import { aS as o, aT as n, aU as i, aV as d, aW as l, aX as c, aY as m, aZ as p, a_ as f } from "./vendor-base-ui-DWIDNgE1.js";
function x({ children: a }) {
  return /* @__PURE__ */ e(o, { children: [
    a,
    /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(i, { className: "fixed top-auto right-4 bottom-4 z-10 mx-auto flex w-[250px] sm:right-8 sm:bottom-8 sm:w-[300px]", children: /* @__PURE__ */ t(v, {}) }) })
  ] });
}
function v() {
  const { toasts: a } = d();
  return a.map((s) => /* @__PURE__ */ t(
    l,
    {
      toast: s,
      className: r(
        "absolute right-0 bottom-0 left-auto z-[calc(1000-var(--toast-index))] mr-0 h-[var(--height)] w-full origin-bottom rounded-lg border border-kumo-fill bg-kumo-control bg-clip-padding p-4 shadow-lg select-none",
        "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]",
        "[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s]",
        "after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']",
        "data-[ending-style]:opacity-0 data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)))] data-[limited]:opacity-0 data-[starting-style]:[transform:translateY(150%)]",
        "data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]",
        "data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]",
        "data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]",
        "data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",
        "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]"
      ),
      children: /* @__PURE__ */ e(c, { className: "overflow-hidden transition-opacity [transition-duration:250ms] data-[behind]:pointer-events-none data-[behind]:opacity-0 data-[expanded]:pointer-events-auto data-[expanded]:opacity-100", children: [
        /* @__PURE__ */ t(m, { className: "text-[0.975rem] leading-5 font-medium text-kumo-default" }),
        /* @__PURE__ */ t(p, { className: "text-[0.925rem] leading-5 text-kumo-subtle" }),
        /* @__PURE__ */ t(
          f,
          {
            className: "absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded border-none bg-transparent text-kumo-subtle hover:bg-kumo-fill-hover hover:text-kumo-strong",
            "aria-label": "Close",
            children: /* @__PURE__ */ t(h, { className: "h-4 w-4" })
          }
        )
      ] })
    },
    s.id
  ));
}
function h(a) {
  return /* @__PURE__ */ e(
    "svg",
    {
      xmlns: "http://www.w3.org/2000/svg",
      width: "24",
      height: "24",
      viewBox: "0 0 24 24",
      fill: "none",
      stroke: "currentColor",
      strokeWidth: "2",
      strokeLinecap: "round",
      strokeLinejoin: "round",
      ...a,
      children: [
        /* @__PURE__ */ t("path", { d: "M18 6 6 18" }),
        /* @__PURE__ */ t("path", { d: "m6 6 12 12" })
      ]
    }
  );
}
export {
  x as T
};
//# sourceMappingURL=toast-8YyyQuqZ.js.map
