'use strict';

var chunkDWNKXV5E_cjs = require('./chunk-DWNKXV5E.cjs');
var dialog = require('@base-ui/react/dialog');
var icons = require('@blueprintjs/icons');
var classnames = require('classnames');
var React = require('react');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var classnames__default = /*#__PURE__*/_interopDefault(classnames);
var React__default = /*#__PURE__*/_interopDefault(React);

// src/base-components/dialog/Dialog.module.css
var Dialog_default = {};

// src/base-components/dialog/Dialog.tsx
function Dialog({
  isOpen,
  onOpenChange,
  title,
  children,
  footer,
  className,
  disablePointerDismissal
}) {
  const portalContainer = chunkDWNKXV5E_cjs.usePortalContainer();
  return /* @__PURE__ */ React__default.default.createElement(dialog.Dialog.Root, {
    open: isOpen,
    onOpenChange,
    disablePointerDismissal
  }, /* @__PURE__ */ React__default.default.createElement(dialog.Dialog.Portal, {
    container: portalContainer
  }, /* @__PURE__ */ React__default.default.createElement(dialog.Dialog.Backdrop, {
    className: Dialog_default.backdrop
  }), /* @__PURE__ */ React__default.default.createElement(dialog.Dialog.Popup, {
    className: classnames__default.default(Dialog_default.popup, className)
  }, /* @__PURE__ */ React__default.default.createElement("div", {
    className: Dialog_default.header
  }, /* @__PURE__ */ React__default.default.createElement(dialog.Dialog.Title, {
    className: Dialog_default.title
  }, title), /* @__PURE__ */ React__default.default.createElement(dialog.Dialog.Close, {
    className: Dialog_default.closeButton,
    "aria-label": "Close dialog"
  }, /* @__PURE__ */ React__default.default.createElement(icons.Cross, {
    className: Dialog_default.closeIcon
  }))), /* @__PURE__ */ React__default.default.createElement("div", {
    className: Dialog_default.body
  }, children), footer != null && /* @__PURE__ */ React__default.default.createElement("div", {
    className: Dialog_default.footer
  }, footer))));
}

exports.Dialog = Dialog;
//# sourceMappingURL=chunk-C6IPNPMZ.cjs.map
//# sourceMappingURL=chunk-C6IPNPMZ.cjs.map