"use strict";
/**
 * Duration Constants for CLI
 * Issue #518: CLI-side duration mapping (safe-regex2 dependency avoidance)
 *
 * [DR1-09] Cross-validation test ensures these values match server-side
 * ALLOWED_DURATIONS in src/config/auto-yes-config.ts
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ALLOWED_DURATIONS = exports.DURATION_MAP = void 0;
exports.parseDurationToMs = parseDurationToMs;
/** Allowed duration values and their millisecond equivalents */
exports.DURATION_MAP = {
    '1h': 3_600_000,
    '3h': 10_800_000,
    '8h': 28_800_000,
};
/** List of allowed duration strings */
exports.ALLOWED_DURATIONS = Object.keys(exports.DURATION_MAP);
/**
 * Parse a duration string to milliseconds.
 * @param duration - Duration string (e.g., '1h', '3h', '8h')
 * @returns Milliseconds or null if invalid
 */
function parseDurationToMs(duration) {
    return exports.DURATION_MAP[duration] ?? null;
}
