const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../../../../pro/compensatedPisellContainer/index.js");
const require_withResponsive = require("../../../../../responsive/withResponsive.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_utils = require("@pisell/utils");
//#region src/components/booking/components/footer/AppointmentProductModal/index.tsx
const AppointmentProductModal = (props, ref) => {
	const { variant } = props;
	const [open, setOpen] = (0, react.useState)(false);
	const isPhoneVariant = variant === "phone";
	(0, react.useImperativeHandle)(ref, () => ({ open: () => {
		setOpen(true);
	} }));
	return /* @__PURE__ */ react.default.createElement(require_index.default, {
		renderType: isPhoneVariant ? "drawer" : "modal",
		props: isPhoneVariant ? {
			open,
			placement: "bottom",
			width: "100%",
			height: "auto",
			title: _pisell_utils.locales.getText("pisell2.text.missing.reservation.title"),
			onClose: () => setOpen(false),
			footer: /* @__PURE__ */ react.default.createElement("div", { style: {
				display: "flex",
				gap: 12
			} }, /* @__PURE__ */ react.default.createElement(antd.Button, {
				style: { flex: 1 },
				onClick: () => setOpen(false)
			}, _pisell_utils.locales.getText("pisell2.text.cancel")), /* @__PURE__ */ react.default.createElement(antd.Button, {
				style: { flex: 1 },
				type: "primary",
				onClick: () => setOpen(false)
			}, _pisell_utils.locales.getText("pisell2.text.confirm")))
		} : {
			open,
			platform: "pc",
			title: _pisell_utils.locales.getText("pisell2.text.missing.reservation.title"),
			onCancel: () => setOpen(false),
			footer: /* @__PURE__ */ react.default.createElement("div", { style: {
				display: "flex",
				justifyContent: "flex-end",
				gap: 8
			} }, /* @__PURE__ */ react.default.createElement(antd.Button, { onClick: () => setOpen(false) }, _pisell_utils.locales.getText("pisell2.text.cancel")), /* @__PURE__ */ react.default.createElement(antd.Button, {
				type: "primary",
				onClick: () => setOpen(false)
			}, _pisell_utils.locales.getText("pisell2.text.confirm"))),
			closable: true
		}
	}, /* @__PURE__ */ react.default.createElement("div", null, _pisell_utils.locales.getText("pisell2.text.missing.reservation.content")));
};
const ForwardedAppointmentProductModal = (0, react.forwardRef)(AppointmentProductModal);
ForwardedAppointmentProductModal.displayName = "AppointmentProductModal";
var AppointmentProductModal_default = require_withResponsive.default(ForwardedAppointmentProductModal);
//#endregion
exports.default = AppointmentProductModal_default;
