import { formatDate } from "../../../utils.js";
import DayItem from "./DayItem/index.js";
import dayjs from "dayjs";
import classNames from "classnames";
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
import "./index.less";
//#region src/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.tsx
dayjs.extend(isSameOrBefore);
const Item = (props) => {
	const { date, status, disabled, select, onClick, showMonth, dateText, week } = props;
	return /* @__PURE__ */ React.createElement("div", {
		className: classNames("calendar-date-item", {
			disabledDate: disabled,
			disabledSelect: status === "sold_out",
			selectDate: select
		}),
		onClick: () => onClick && onClick(date)
	}, showMonth && /* @__PURE__ */ React.createElement("div", { className: "calendar-header-wrap" }, /* @__PURE__ */ React.createElement("div", { className: classNames("current-month", "current-year") }, formatDate(dateText, "YYYY")), /* @__PURE__ */ React.createElement("div", { className: "current-month" }, formatDate(dateText, "MMM"))), /* @__PURE__ */ React.createElement(DayItem, {
		week,
		date,
		status
	}));
};
//#endregion
export { Item as default };
