var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/drag-modal/ModalBg.tsx
var ModalBg_exports = {};
__export(ModalBg_exports, {
  default: () => ModalBg_default
});
module.exports = __toCommonJS(ModalBg_exports);
var import_antd = require("antd");
var import_react = require("react");
var import_react_scale_view = require("react-scale-view");
var import_index_module = __toESM(require("./index.module.less"));
function Index(props) {
  let width = props.width || 800;
  const [isModalOpen, setIsModalOpen] = (0, import_react.useState)(false);
  const handleOk = () => {
    setIsModalOpen(false);
  };
  const handleCancel = () => {
    setIsModalOpen(false);
  };
  return /* @__PURE__ */ React.createElement("div", { ...props }, /* @__PURE__ */ React.createElement("div", { onClick: () => setIsModalOpen(true) }, props.children), /* @__PURE__ */ React.createElement(
    import_antd.ConfigProvider,
    {
      theme: {
        components: {
          Modal: {
            headerBg: "transparent",
            contentBg: "transparent"
          }
        }
      }
    },
    /* @__PURE__ */ React.createElement(
      import_antd.Modal,
      {
        className: import_index_module.default.modal,
        title: /* @__PURE__ */ React.createElement("div", { className: import_index_module.default.title }, /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React.createElement("img", { src: require("./left_title.png") }), props.title), /* @__PURE__ */ React.createElement("div", null)),
        closeIcon: /* @__PURE__ */ React.createElement(
          "span",
          {
            style: {
              fontSize: 32,
              color: "#6DBAFF",
              paddingRight: 12,
              paddingTop: 12
            }
          },
          "x"
        ),
        open: isModalOpen,
        onOk: handleOk,
        onCancel: handleCancel,
        footer: null,
        transitionName: "",
        width
      },
      props.content
    )
  ));
}
var ModalBg_default = (0, import_react_scale_view.withSize)(Index);
