export function generateTimeSteps(step) {
    const steps = [];
    for (let hour = 0; hour < 24; hour++) {
        for (let minute = 0; minute < 60; minute += step) {
            const formattedHour = hour.toString().padStart(2, '0');
            const formattedMinute = minute.toString().padStart(2, '0');
            steps.push(`${formattedHour}:${formattedMinute}`);
        }
    }
    return steps;
}
export function generateTimeStepsWithMinMaxValue(step, min, max, hideDisable) {
    const steps = [];
    let minTotal;
    let maxTotal;
    if (min) {
        const [minHour, minMinute] = min.split(':').map(Number);
        minTotal = minHour * 60 + minMinute;
    }
    if (max) {
        const [maxHour, maxMinute] = max.split(':').map(Number);
        maxTotal = maxHour * 60 + maxMinute;
    }
    for (let hour = 0; hour < 24; hour++) {
        for (let minute = 0; minute < 60; minute += step) {
            const total = hour * 60 + minute;
            const formattedHour = hour.toString().padStart(2, '0');
            const formattedMinute = minute.toString().padStart(2, '0');
            const time = `${formattedHour}:${formattedMinute}`;
            const disable = (!!minTotal && total < minTotal) || (!!maxTotal && total > maxTotal);
            if (hideDisable && disable) {
                continue;
            }
            steps.push({ time, disable });
        }
    }
    return steps;
}
export const toMinutes = (timeStr) => {
    const [h, m] = timeStr.split(':').map(Number);
    return h * 60 + m;
};
//# sourceMappingURL=utils.js.map