const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_index = require("../index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_materials = require("@pisell/materials");
//#region src/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.tsx
const PisellFloatingPanel = (0, react.forwardRef)((props, ref) => {
	const { currentDate, onBookingClick, bookingId } = props;
	const [isOpen, setIsOpen] = (0, react.useState)(false);
	const bookingDataPanelRef = (0, react.useRef)(null);
	const floationgPanelProps = (0, react.useMemo)(() => {
		return {
			fullHeight: "calc(100% - 62px)",
			retractHeight: "0px",
			defaultOpen: isOpen,
			style: {
				background: "var(--Gray-950, #0C111D)",
				width: "470px",
				height: "100%",
				zIndex: "1000",
				left: "16px"
			},
			retractIconStyle: {
				color: "#fff",
				fontSize: "20px"
			},
			width: "470px",
			isFloat: true,
			onOpenChange: (open) => {
				setIsOpen(open);
			}
		};
	}, []);
	(0, react.useImperativeHandle)(ref, () => ({
		open: () => {
			var _bookingDataPanelRef$;
			(_bookingDataPanelRef$ = bookingDataPanelRef.current) === null || _bookingDataPanelRef$ === void 0 || _bookingDataPanelRef$.refresh();
			setIsOpen(true);
		},
		close: () => {
			setIsOpen(false);
		},
		refresh: () => {
			var _bookingDataPanelRef$2;
			(_bookingDataPanelRef$2 = bookingDataPanelRef.current) === null || _bookingDataPanelRef$2 === void 0 || _bookingDataPanelRef$2.refresh();
		},
		getIsOpen: () => {
			return isOpen;
		}
	}));
	return /* @__PURE__ */ react.default.createElement(_pisell_materials.PisellFloatingPanel, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, floationgPanelProps), {}, { open: isOpen }), /* @__PURE__ */ react.default.createElement(require_index.default, {
		currentDate,
		bookingId,
		onBookingClick,
		ref: bookingDataPanelRef
	}));
});
var pisellFloatingPanel_default = (0, react.memo)(PisellFloatingPanel);
//#endregion
exports.default = pisellFloatingPanel_default;
