'use strict';

var jsxRuntime = require('react/jsx-runtime');
var reactI18next = require('react-i18next');
var utils = require('../utils-BhM0B89p.js');
var button = require('../button-CSBhDSDJ.js');
var sheet = require('../sheet-BMQ9juND.js');
var x = require('../x-Brw3FJst.js');
var DialogTrigger = require('../DialogTrigger-B0Q6yIrx.js');
require('react');
require('../index-vioSzJOw.js');
require('../index-DuNgWCXZ.js');
require('../index-D-iDn9RI.js');
require('../createLucideIcon-D0tRgV6l.js');
require('../useOpenInteractionType-D4z6FTrA.js');
require('../floating-ui.utils.dom-BGEmL7pd.js');
require('react-dom');
require('../index-DnKJmaCq.js');
require('../index-BrpkRQoS.js');
require('../with-selector-DeKHbQY7.js');

const Sheet = (props) => /* @__PURE__ */ jsxRuntime.jsx(sheet.Sheet, { ...props });
const SheetTrigger = (props) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetTrigger, { ...props });
const SheetClose = (props) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetClose, { ...props });
const SheetContent = ({
  className,
  children,
  side = "right",
  showCloseButton = true,
  overlayClassName,
  keepMounted,
  ...props
}) => {
  const { t } = reactI18next.useTranslation();
  return /* @__PURE__ */ jsxRuntime.jsxs(DialogTrigger.DialogPortal, { "data-slot": "sheet-portal", keepMounted, children: [
    /* @__PURE__ */ jsxRuntime.jsx(
      DialogTrigger.DialogBackdrop,
      {
        forceRender: true,
        "data-slot": "sheet-overlay",
        className: utils.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__ */ jsxRuntime.jsxs(
      DialogTrigger.DialogPopup,
      {
        "data-slot": "sheet-content",
        "data-side": side,
        className: utils.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__ */ jsxRuntime.jsxs(
            DialogTrigger.DialogClose,
            {
              "data-slot": "sheet-close",
              "data-testid": "sheet-close-button",
              render: /* @__PURE__ */ jsxRuntime.jsx(
                button.Button,
                {
                  variant: "ghost",
                  className: "absolute top-3 end-3",
                  size: "icon-sm"
                }
              ),
              children: [
                /* @__PURE__ */ jsxRuntime.jsx(x.X, {}),
                /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: t("neetoatoms.sheet.close", "Close") })
              ]
            }
          )
        ]
      }
    )
  ] });
};
const SheetHeader = ({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetHeader, { className: utils.cn("gap-3 p-6", className), ...props });
const SheetFooter = ({
  className,
  ...props
}) => /* @__PURE__ */ jsxRuntime.jsx(
  sheet.SheetFooter,
  {
    className: utils.cn("bg-muted/50 px-6 py-4", className),
    ...props
  }
);
const SheetTitle = (props) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetTitle, { ...props });
const SheetDescription = (props) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetDescription, { ...props });

exports.Sheet = Sheet;
exports.SheetClose = SheetClose;
exports.SheetContent = SheetContent;
exports.SheetDescription = SheetDescription;
exports.SheetFooter = SheetFooter;
exports.SheetHeader = SheetHeader;
exports.SheetTitle = SheetTitle;
exports.SheetTrigger = SheetTrigger;
//# sourceMappingURL=Sheet.js.map
