"use strict";
var import_Drawer = require("../Drawer.css");
const jsxRuntime = require("react/jsx-runtime");
const antd = require("antd");
const kit_Button = require("./Button.cjs");
const kit_Icon = require("./Icon.cjs");
const kit_Theme_UI = require("./Theme/UI.cjs");
require("./Theme/themeUtils.cjs");
require("./Theme/themes.cjs");
const body = "Drawer_body_11717";
const header = "Drawer_header_11717";
const headerTitle = "Drawer_headerTitle_11717";
const mobileWidth = "Drawer_mobileWidth_11717";
const css = {
  body,
  header,
  headerTitle,
  mobileWidth
};
const DrawerComponent = ({
  children,
  maskClosable = true,
  open,
  placement,
  title,
  onClose
}) => {
  const {
    themeSettings: { className: themeClass }
  } = kit_Theme_UI.useTheme();
  const rootClasses = [css.mobileWidth, themeClass];
  return /* @__PURE__ */ jsxRuntime.jsxs(
    antd.Drawer,
    {
      bodyStyle: { padding: 0 },
      closable: false,
      maskClosable,
      open,
      placement,
      rootClassName: rootClasses.join(" "),
      width: "700px",
      onClose,
      children: [
        /* @__PURE__ */ jsxRuntime.jsxs("div", { className: css.header, children: [
          /* @__PURE__ */ jsxRuntime.jsx("div", { className: css.headerTitle, children: title }),
          /* @__PURE__ */ jsxRuntime.jsx(
            kit_Button,
            {
              icon: /* @__PURE__ */ jsxRuntime.jsx(kit_Icon.default, { name: "close", size: "small", title: "Close drawer" }),
              type: "text",
              onClick: onClose
            }
          )
        ] }),
        /* @__PURE__ */ jsxRuntime.jsx("div", { className: css.body, children })
      ]
    }
  );
};
module.exports = DrawerComponent;
