import { jsx, jsxs } from 'react/jsx-runtime';
import { useTranslation } from 'react-i18next';
import { c as cn } from '../utils-BJnb9o5c.js';
import { B as Button } from '../button-CePY5zne.js';
import { S as SheetHeader$1, a as SheetFooter$1, b as SheetTitle$1, c as SheetDescription$1, d as Sheet$1, e as SheetClose$1, f as SheetTrigger$1 } from '../sheet-B9oDGvvX.js';
import { X } from '../x-_o2T3n6D.js';
import { b as DialogPortal, c as DialogBackdrop, D as DialogPopup, a as DialogClose } from '../DialogTrigger-a3diAOif.js';
import 'react';
import '../index-Bo3AAQJp.js';
import '../index-CfriMyrd.js';
import '../index-BtkPdosV.js';
import '../createLucideIcon-C8ycilSN.js';
import '../useOpenInteractionType-CVfxIsuz.js';
import '../floating-ui.utils.dom-Bw_Rc4bg.js';
import 'react-dom';
import '../index-DZXbzIgC.js';
import '../index-CSMSzzKM.js';
import '../with-selector-Dv0G_V_o.js';

const Sheet = (props) => /* @__PURE__ */ jsx(Sheet$1, { ...props });
const SheetTrigger = (props) => /* @__PURE__ */ jsx(SheetTrigger$1, { ...props });
const SheetClose = (props) => /* @__PURE__ */ jsx(SheetClose$1, { ...props });
const SheetContent = ({
  className,
  children,
  side = "right",
  showCloseButton = true,
  overlayClassName,
  keepMounted,
  ...props
}) => {
  const { t } = useTranslation();
  return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "sheet-portal", keepMounted, children: [
    /* @__PURE__ */ jsx(
      DialogBackdrop,
      {
        forceRender: true,
        "data-slot": "sheet-overlay",
        className: cn(
          "fixed inset-0 z-50 bg-black/50 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0",
          overlayClassName
        )
      }
    ),
    /* @__PURE__ */ jsxs(
      DialogPopup,
      {
        "data-slot": "sheet-content",
        "data-side": side,
        className: cn(
          "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg outline-none transition duration-200 ease-in-out",
          "data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:border-border",
          "data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:border-border data-[side=left]:sm:max-w-sm",
          "data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:border-border data-[side=right]:sm:max-w-sm",
          "data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:border-border",
          "data-starting-style:opacity-0 data-ending-style:opacity-0",
          "data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=bottom]:data-ending-style:translate-y-[2.5rem]",
          "data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=left]:data-ending-style:translate-x-[-2.5rem]",
          "data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=right]:data-ending-style:translate-x-[2.5rem]",
          "data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=top]:data-ending-style:translate-y-[-2.5rem]",
          className
        ),
        ...props,
        children: [
          children,
          showCloseButton && /* @__PURE__ */ jsxs(
            DialogClose,
            {
              "data-slot": "sheet-close",
              "data-testid": "sheet-close-button",
              render: /* @__PURE__ */ jsx(
                Button,
                {
                  variant: "ghost",
                  className: "absolute top-3 end-3",
                  size: "icon-sm"
                }
              ),
              children: [
                /* @__PURE__ */ jsx(X, {}),
                /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("neetoatoms.sheet.close", "Close") })
              ]
            }
          )
        ]
      }
    )
  ] });
};
const SheetHeader = ({
  className,
  ...props
}) => /* @__PURE__ */ jsx(SheetHeader$1, { className: cn("gap-3 p-6", className), ...props });
const SheetFooter = ({
  className,
  ...props
}) => /* @__PURE__ */ jsx(
  SheetFooter$1,
  {
    className: cn("bg-muted/50 px-6 py-4", className),
    ...props
  }
);
const SheetTitle = (props) => /* @__PURE__ */ jsx(SheetTitle$1, { ...props });
const SheetDescription = (props) => /* @__PURE__ */ jsx(SheetDescription$1, { ...props });

export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
//# sourceMappingURL=Sheet.js.map
