/**
 * Shared utility functions for Calendar components
 */
/**
 * Check if two dates are the same day
 */
const isSameDay = (date1, date2) => {
    return (date1.getFullYear() === date2.getFullYear() &&
        date1.getMonth() === date2.getMonth() &&
        date1.getDate() === date2.getDate());
};
/**
 * Check if a date is disabled based on min/max dates and custom disabled dates
 */
const isDateDisabled = (date, minDate, maxDate, disabledDates) => {
    if (minDate && date < minDate)
        return true;
    if (maxDate && date > maxDate)
        return true;
    if (disabledDates === null || disabledDates === void 0 ? void 0 : disabledDates.some((disabledDate) => isSameDay(disabledDate, date)))
        return true;
    return false;
};
/**
 * Check if a date belongs to the specified month
 */
const isCurrentMonth = (date, referenceMonth) => {
    return (date.getMonth() === referenceMonth.getMonth() &&
        date.getFullYear() === referenceMonth.getFullYear());
};
/**
 * Get the full month name for a date
 */
const getMonthName = (date, customMonths) => {
    const DEFAULT_MONTHS = [
        'January',
        'February',
        'March',
        'April',
        'May',
        'June',
        'July',
        'August',
        'September',
        'October',
        'November',
        'December',
    ];
    const months = customMonths || DEFAULT_MONTHS;
    return months[date.getMonth()];
};

export { getMonthName, isCurrentMonth, isDateDisabled, isSameDay };
