const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../../../Sales/Cart/index.js");
const require_index$1 = require("../../../../Sales/Holder/index.js");
const require_index$2 = require("../../../../Sales/Summary/index.js");
const require_SelectHolderModal = require("../SelectHolderModal.js");
const require_index$3 = require("../Cart/ContinueButton/index.js");
const require_index$4 = require("../Cart/index.js");
const require_Total = require("../Cart/Item/Total.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_materials = require("@pisell/materials");
let src_components_eventBooking_assets_shopping_cart_svg = require("../../../assets/shopping-cart.svg");
src_components_eventBooking_assets_shopping_cart_svg = require_runtime.__toESM(src_components_eventBooking_assets_shopping_cart_svg);
require("./index.less");
//#region src/components/eventBooking/components/Provider/Footer/index.tsx
const Footer = () => {
	var _cartData$cartItems;
	const { open } = require_index$1.useHolder();
	const { onOpenCart, openCart, onCloseCart, cartData } = require_index.useCart();
	const { total } = require_index$2.useSummary();
	const [selectedItem, setSelectedItem] = (0, react.useState)(null);
	return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(_pisell_materials.SectionFooters, {
		className: "section-footer-wrap",
		left: /* @__PURE__ */ react.default.createElement(require_Total.default, {
			className: "section-footer-left",
			isFooter: true
		}),
		right: /* @__PURE__ */ react.default.createElement("div", { className: "section-footer-right" }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Badge, { count: ((_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) || 0 }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Button, {
			size: "large",
			onClick: () => onOpenCart(),
			className: "section-footer-btn"
		}, /* @__PURE__ */ react.default.createElement(_pisell_materials.Image, {
			src: src_components_eventBooking_assets_shopping_cart_svg.default,
			preview: false
		}))), /* @__PURE__ */ react.default.createElement(require_index$3.default, null))
	}), /* @__PURE__ */ react.default.createElement(require_SelectHolderModal.default, {
		open,
		selectedItem,
		onSelect: (e) => {
			setSelectedItem(e);
		}
	}), /* @__PURE__ */ react.default.createElement(require_index$4.default, {
		open: openCart,
		onCancel: () => onCloseCart()
	}));
};
//#endregion
exports.default = Footer;
