"use client";
import { jsx as e, jsxs as i } from "react/jsx-runtime";
import { XIcon as n } from "lucide-react";
import { Button as g } from "./button.js";
import { cn as s } from "../../../lib/utils.js";
import { D as m } from "../../../DialogRoot-DPdhw92q.js";
import { D as o, a as c, b as h, e as f, f as p, d as u, c as x } from "../../../DialogTrigger-C5WbKc3Z.js";
function C({ ...t }) {
  return /* @__PURE__ */ e(m, { "data-slot": "sheet", ...t });
}
function T({ ...t }) {
  return /* @__PURE__ */ e(p, { "data-slot": "sheet-trigger", ...t });
}
function z({ ...t }) {
  return /* @__PURE__ */ e(o, { "data-slot": "sheet-close", ...t });
}
function y({ ...t }) {
  return /* @__PURE__ */ e(u, { "data-slot": "sheet-portal", ...t });
}
function b({ className: t, ...a }) {
  return /* @__PURE__ */ e(
    x,
    {
      className: s(
        "fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
        t
      ),
      "data-slot": "sheet-overlay",
      ...a
    }
  );
}
function P({
  className: t,
  children: a,
  side: d = "right",
  showCloseButton: r = !0,
  ...l
}) {
  return /* @__PURE__ */ i(y, { children: [
    /* @__PURE__ */ e(b, {}),
    /* @__PURE__ */ i(
      c,
      {
        className: s(
          "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-popover-foreground text-sm shadow-lg transition duration-200 ease-in-out data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=bottom]:inset-x-0 data-[side=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-[side=left]:lg:max-w-lg data-[side=right]:lg:max-w-lg data-[side=left]:xl:max-w-xl data-[side=right]:xl:max-w-xl",
          t
        ),
        "data-side": d,
        "data-slot": "sheet-content",
        ...l,
        children: [
          a,
          r && /* @__PURE__ */ i(
            o,
            {
              "data-slot": "sheet-close",
              render: /* @__PURE__ */ e(
                g,
                {
                  className: "absolute top-4 right-4",
                  size: "icon-sm",
                  variant: "ghost"
                }
              ),
              children: [
                /* @__PURE__ */ e(n, {}),
                /* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
              ]
            }
          )
        ]
      }
    )
  ] });
}
function j({ className: t, ...a }) {
  return /* @__PURE__ */ e(
    "div",
    {
      className: s("flex flex-col gap-1.5 p-4", t),
      "data-slot": "sheet-header",
      ...a
    }
  );
}
function B({ className: t, ...a }) {
  return /* @__PURE__ */ e(
    "div",
    {
      className: s("mt-auto flex flex-col gap-2 p-4", t),
      "data-slot": "sheet-footer",
      ...a
    }
  );
}
function F({ className: t, ...a }) {
  return /* @__PURE__ */ e(
    f,
    {
      className: s("font-medium text-foreground", t),
      "data-slot": "sheet-title",
      ...a
    }
  );
}
function H({
  className: t,
  ...a
}) {
  return /* @__PURE__ */ e(
    h,
    {
      className: s("text-muted-foreground text-sm", t),
      "data-slot": "sheet-description",
      ...a
    }
  );
}
export {
  C as Sheet,
  z as SheetClose,
  P as SheetContent,
  H as SheetDescription,
  B as SheetFooter,
  j as SheetHeader,
  F as SheetTitle,
  T as SheetTrigger
};
