import { useEffect as e, useRef as t } from "react";
import n from "prop-types";
import { jsx as r } from "react/jsx-runtime";
import i from "react-modal";
//#region src/plugins/modals/components/Modal.jsx
var a = ({ isOpen: e = !1, contentLabel: t = null, aria: n = {}, children: a = null }) => /* @__PURE__ */ r(i, {
	isOpen: e,
	contentLabel: t,
	aria: n,
	closeTimeoutMS: 200,
	className: "ReactModalDefault",
	overlayClassName: "ReactModalOverlay",
	children: /* @__PURE__ */ r("div", {
		className: "modal-content",
		children: a
	})
});
a.propTypes = {
	isOpen: n.bool,
	contentLabel: n.string,
	aria: n.shape({
		labelledby: n.string,
		describedby: n.string
	}),
	children: n.node
};
//#endregion
//#region src/plugins/modals/components/ModalHeader.jsx
var o = ({ children: e = null }) => /* @__PURE__ */ r("div", {
	className: "modal-header",
	children: e
});
o.propTypes = { children: n.node };
//#endregion
//#region src/plugins/modals/components/ModalTitle.jsx
var s = ({ id: e = null, children: t = null }) => /* @__PURE__ */ r("div", {
	id: e,
	className: "modal-title",
	children: t
});
s.propTypes = {
	id: n.string,
	children: n.node
};
//#endregion
//#region src/plugins/modals/components/ModalBody.jsx
var c = ({ children: e = null }) => /* @__PURE__ */ r("div", {
	className: "modal-body",
	children: /* @__PURE__ */ r("div", { children: e })
});
c.propTypes = { children: n.node };
//#endregion
//#region src/plugins/modals/components/ModalFooter.jsx
var l = ({ children: e = null }) => /* @__PURE__ */ r("div", {
	className: "modal-footer",
	children: e
});
l.propTypes = { children: n.node };
//#endregion
//#region src/plugins/modals/hooks.js
var u = () => {
	let n = t(null);
	return e(() => (i.setAppElement(n.current), () => i.setAppElement(null)), []), n;
}, d = () => ({
	rootInjects: { useSwaggerEditorReactModal: u },
	components: {
		Modal: a,
		ModalHeader: o,
		ModalTitle: s,
		ModalBody: c,
		ModalFooter: l
	}
});
//#endregion
export { d as default };

//# sourceMappingURL=index.js.map