"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeTimeValue = normalizeTimeValue;
const normalize_timestamp_1 = require("./normalize-timestamp");
/**
 * 标准化时间选择器的值
 */
function normalizeTimeValue(value, componentProps) {
    const format = componentProps === null || componentProps === void 0 ? void 0 : componentProps.format;
    // 时间范围选择器：返回 [startTime, endTime] 格式
    if (Array.isArray(value)) {
        return value.map((v) => (0, normalize_timestamp_1.normalizeTimestamp)(v, format));
    }
    // 单个时间选择器
    return (0, normalize_timestamp_1.normalizeTimestamp)(value, format);
}
