const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../../../../businessModel/SalesModel/Sales/index.js");
const require_index$1 = require("../../../../Sales/Step/index.js");
const require_index$2 = require("../../progressBar/index.js");
const require_utils = require("../../../utils.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
require("./index.less");
//#region src/components/eventBooking/components/Provider/Header/index.tsx
const Header = () => {
	var _steps$currentStepDat, _steps$currentStepDat2;
	const { currentStepData, closePage, prevStep, isFirstStep } = require_index$1.useStep();
	const { removeSessionStorage, data } = require_index.useSales();
	/**
	* @title: 步骤数据多语言
	* @description:
	* @return {*}
	* @Author: WangHan
	* @Date: 2025-01-19 10:36
	*/
	const steps = {
		"select-category": {
			title: _pisell_utils.locales.getText("pisell2.event.step")(1),
			description: _pisell_utils.locales.getText("pisell2.event.select.category")(require_utils.resourceTitle(data))
		},
		"select-event": {
			title: _pisell_utils.locales.getText("pisell2.event.step")(2),
			description: _pisell_utils.locales.getText("pisell2.event.select.event")
		},
		"confirm-information": {
			title: _pisell_utils.locales.getText("pisell2.event.step")(3),
			description: _pisell_utils.locales.getText("pisell2.event.confirm.information")
		}
	};
	/**
	* @title: 返回
	* @description:
	* @return {*}
	* @Author: WangHan
	* @Date: 2025-01-18 22:28
	*/
	const handleBack = () => {
		prevStep();
	};
	/**
	* @title: 关闭页面
	* @description:
	* @return {*}
	* @Author: WangHan
	* @Date: 2025-01-22 13:43
	*/
	const handleClose = () => {
		closePage();
		removeSessionStorage();
	};
	return /* @__PURE__ */ react.default.createElement(require_index$2.default, {
		title: (_steps$currentStepDat = steps[currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.key]) === null || _steps$currentStepDat === void 0 ? void 0 : _steps$currentStepDat.title,
		description: (_steps$currentStepDat2 = steps[currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.key]) === null || _steps$currentStepDat2 === void 0 ? void 0 : _steps$currentStepDat2.description,
		showBack: !isFirstStep,
		onBack: () => handleBack(),
		onClose: () => handleClose(),
		className: "event-booking-header"
	});
};
//#endregion
exports.default = Header;
