"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const vitest_1 = require("vitest");
const time_modifiers_js_1 = require("./time-modifiers.js");
(0, vitest_1.describe)('getTimePeriod', () => {
    (0, vitest_1.it)('should return morning for hours 7-11', () => {
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(7)).toBe('morning');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(8)).toBe('morning');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(11)).toBe('morning');
    });
    (0, vitest_1.it)('should return afternoon for hours 12-17', () => {
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(12)).toBe('afternoon');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(15)).toBe('afternoon');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(17)).toBe('afternoon');
    });
    (0, vitest_1.it)('should return evening for hours 18-22', () => {
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(18)).toBe('evening');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(20)).toBe('evening');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(22)).toBe('evening');
    });
    (0, vitest_1.it)('should return night for hours 23-6', () => {
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(23)).toBe('night');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(0)).toBe('night');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(3)).toBe('night');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(6)).toBe('night');
    });
    (0, vitest_1.it)('should handle boundary hours correctly', () => {
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(6)).toBe('night');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(7)).toBe('morning');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(11)).toBe('morning');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(12)).toBe('afternoon');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(17)).toBe('afternoon');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(18)).toBe('evening');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(22)).toBe('evening');
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(23)).toBe('night');
    });
    (0, vitest_1.it)('should wrap hours >= 24 using modulo', () => {
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(24)).toBe('night'); // 24 % 24 = 0
        (0, vitest_1.expect)((0, time_modifiers_js_1.getTimePeriod)(31)).toBe('morning'); // 31 % 24 = 7
    });
});
(0, vitest_1.describe)('getTimeModifier', () => {
    (0, vitest_1.it)('should return morning modifier with günaydın greeting', () => {
        const mod = (0, time_modifiers_js_1.getTimeModifier)(9);
        (0, vitest_1.expect)(mod.period).toBe('morning');
        (0, vitest_1.expect)(mod.speedMultiplier).toBe(1.0);
        (0, vitest_1.expect)(mod.greetingStyle).toBe('günaydın');
        (0, vitest_1.expect)(mod.sleepActive).toBe(false);
    });
    (0, vitest_1.it)('should return afternoon modifier with normal speed', () => {
        const mod = (0, time_modifiers_js_1.getTimeModifier)(14);
        (0, vitest_1.expect)(mod.period).toBe('afternoon');
        (0, vitest_1.expect)(mod.speedMultiplier).toBe(1.0);
        (0, vitest_1.expect)(mod.sleepActive).toBe(false);
    });
    (0, vitest_1.it)('should return evening modifier with faster speed', () => {
        const mod = (0, time_modifiers_js_1.getTimeModifier)(20);
        (0, vitest_1.expect)(mod.period).toBe('evening');
        (0, vitest_1.expect)(mod.speedMultiplier).toBeLessThan(1.0);
        (0, vitest_1.expect)(mod.sleepActive).toBe(false);
    });
    (0, vitest_1.it)('should return night modifier with slow speed and sleep active', () => {
        const mod = (0, time_modifiers_js_1.getTimeModifier)(2);
        (0, vitest_1.expect)(mod.period).toBe('night');
        (0, vitest_1.expect)(mod.speedMultiplier).toBeGreaterThan(1.0);
        (0, vitest_1.expect)(mod.sleepActive).toBe(true);
    });
    (0, vitest_1.it)('should return a copy, not a reference to TIME_MODIFIERS', () => {
        const mod = (0, time_modifiers_js_1.getTimeModifier)(9);
        mod.speedMultiplier = 999;
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.morning.speedMultiplier).toBe(1.0);
    });
});
(0, vitest_1.describe)('TIME_MODIFIERS', () => {
    (0, vitest_1.it)('should have all four time periods defined', () => {
        const periods = ['morning', 'afternoon', 'evening', 'night'];
        for (const p of periods) {
            (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS[p]).toBeDefined();
            (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS[p].period).toBe(p);
        }
    });
    (0, vitest_1.it)('should have consistent period field in each modifier', () => {
        for (const [key, mod] of Object.entries(time_modifiers_js_1.TIME_MODIFIERS)) {
            (0, vitest_1.expect)(mod.period).toBe(key);
        }
    });
    (0, vitest_1.it)('night should be the only period with sleepActive true', () => {
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.morning.sleepActive).toBe(false);
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.afternoon.sleepActive).toBe(false);
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.evening.sleepActive).toBe(false);
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.night.sleepActive).toBe(true);
    });
    (0, vitest_1.it)('morning should be the only period with a greeting style', () => {
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.morning.greetingStyle).toBe('günaydın');
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.afternoon.greetingStyle).toBeUndefined();
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.evening.greetingStyle).toBeUndefined();
        (0, vitest_1.expect)(time_modifiers_js_1.TIME_MODIFIERS.night.greetingStyle).toBeUndefined();
    });
});
//# sourceMappingURL=time-modifiers.test.js.map