"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVersionLabel = exports.isSelectEventChecked = exports.getHumanizedTime = exports.getHumanizedDateTime = void 0;
const constants_1 = require("../constants");
const getHumanizedDateTime = (dateTime) => {
    if (!dateTime)
        return constants_1.DASH;
    const date = new Date(dateTime);
    return date.toLocaleString();
};
exports.getHumanizedDateTime = getHumanizedDateTime;
const getHumanizedTime = (dateTime) => {
    if (!dateTime)
        return constants_1.DASH;
    const date = new Date(dateTime);
    return date.toLocaleTimeString();
};
exports.getHumanizedTime = getHumanizedTime;
// TypesScript safe
const isSelectEventChecked = (event) => {
    const target = event === null || event === void 0 ? void 0 : event.target;
    return !!(target === null || target === void 0 ? void 0 : target.checked);
};
exports.isSelectEventChecked = isSelectEventChecked;
const getVersionLabel = (version, t) => version.supportLevel === 'beta'
    ? version.label + ' - ' + t('ai:Developer preview release')
    : version.label;
exports.getVersionLabel = getVersionLabel;
//# sourceMappingURL=utils.js.map