const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../../../Sales/Init/index.js");
const require_Detail = require("../../../../Sales/Event/Detail.js");
const require_index$1 = require("../../OpenCard/index.js");
const require_index$2 = require("../../scheduleCalendar/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
//#region src/components/eventBooking/components/bookingDetailModal/components/Schedule.tsx
const Schedule = () => {
	var _detail$selectDate;
	const { initData } = require_index.useInit();
	const { detail, getEventDetailSelectDate } = require_Detail.useEventDetail();
	return /* @__PURE__ */ react.default.createElement(require_index$1.default, {
		title: _pisell_utils.locales.getText("pisell2.event.schedule"),
		showBorder: true,
		isClick: false,
		showArrow: false
	}, /* @__PURE__ */ react.default.createElement(require_index$2.default, {
		showScheduleName: false,
		data: (detail === null || detail === void 0 || (_detail$selectDate = detail.selectDate) === null || _detail$selectDate === void 0 ? void 0 : _detail$selectDate.dates) || [],
		onChange: (e) => {
			var _detail$introduction;
			const id = detail === null || detail === void 0 || (_detail$introduction = detail.introduction) === null || _detail$introduction === void 0 || (_detail$introduction = _detail$introduction._originData) === null || _detail$introduction === void 0 ? void 0 : _detail$introduction.id;
			if (!id) return;
			getEventDetailSelectDate.run(id, {
				days: 366,
				start_date: `${e}-01-01`
			});
		},
		type: initData === null || initData === void 0 ? void 0 : initData.scheduleDisplayType
	}));
};
//#endregion
exports.default = Schedule;
