const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_index = require("./AllSchedules/index.js");
const require_index$1 = require("./SchedulesForDay/index.js");
const require_index$2 = require("./ScheduleDetailDrawer/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
require("./index.less");
//#region src/components/schedules/schedules/Schedules.tsx
/**
* 日程tab项
* @param props
* @constructor
*/
const Schedules = (props) => {
	const { type, detail, onClose, onOpenDetail, dataSource, loading, onCalendarDataChange, onDelete, currentSelectDayDetail, onCloseDay, schedulesForDaySlot, scheduleMap } = props;
	const { id, show, type: createType } = detail;
	const content = (0, react.useMemo)(() => {
		if (type === "all") return /* @__PURE__ */ react.default.createElement(require_index.default, {
			onOpenDetail,
			dataSource,
			loading
		});
		else if (type === "forADay") return /* @__PURE__ */ react.default.createElement(require_index$1.default, {
			onOpenDetail,
			dataSource,
			loading,
			currentSelectDayDetail,
			onCloseDay,
			slot: schedulesForDaySlot,
			scheduleMap
		});
		return null;
	}, [
		type,
		dataSource,
		loading,
		currentSelectDayDetail,
		schedulesForDaySlot,
		scheduleMap
	]);
	return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, content, /* @__PURE__ */ react.default.createElement(require_index$2.default, {
		type: createType,
		scheduleId: id,
		open: show,
		onClose,
		onDelete,
		onCalendarDataChange
	}));
};
//#endregion
exports.default = Schedules;
