const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_objectWithoutProperties = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_utils = require("../../utils.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
//#region src/components/booking/materiels/startTime/index.tsx
const _excluded = [
	"locale",
	"slice",
	"timeObjChange",
	"selectProps"
];
const StartTime = (props) => {
	const { locale = "en", slice = 5, timeObjChange, selectProps } = props, resetProps = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	/**
	* @title: 时间切片
	* @description:
	* @return {*}
	* @Author: zhiwei.Wang
	* @Date: 2024-01-09 13:37
	*/
	const timeObj = (0, react.useMemo)(() => require_utils.sliceDayIntoFiveMinutes(slice, locale), [slice, locale]);
	(0, react.useEffect)(() => {
		timeObjChange === null || timeObjChange === void 0 || timeObjChange(timeObj);
	}, [timeObj]);
	const renderOptions = (0, react.useCallback)((array, value = "value", label = "label") => {
		return array.map((d) => {
			return /* @__PURE__ */ react.default.createElement(antd.Select.Option, {
				value: d[value],
				key: d[value]
			}, d[label]);
		});
	}, []);
	return /* @__PURE__ */ react.default.createElement(antd.Select, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, selectProps), resetProps), renderOptions(timeObj === null || timeObj === void 0 ? void 0 : timeObj.timeSlices));
};
//#endregion
exports.default = StartTime;
