import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Tooltip from "../../Tooltip";
import clsx from "clsx";
const CustomDayContent = (props) => {
    const event = props.eventsData?.find((entry) => {
        const date = new Date(entry.date);
        return (date.getDate() === props.date.getDate() &&
            date.getMonth() === props.date.getMonth() &&
            date.getFullYear() === props.date.getFullYear());
    });
    const isDisabled = props.date.getTime() > new Date().getTime();
    const dayCellClasses = clsx({
        "daypicker-day-cell-content": true,
        disabled: isDisabled,
    });
    return (_jsx(Tooltip, { content: event?.name || "", toolTipPosition: "top", isDisabled: !event, children: _jsxs("span", { className: dayCellClasses, children: [props.date.getDate(), !!event && _jsx("span", { className: "event-dot" })] }) }));
};
export default CustomDayContent;
