"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDateTimeFormat = createDateTimeFormat;
const constants_1 = require("../constants");
const date_1 = require("./utils/date");
function createDateTimeFormat(dateAdapterLocale) {
    return (column) => {
        return {
            cell(val) {
                var _a, _b;
                if (val) {
                    return (0, date_1.formatDateTime)(val, {
                        interv: (_a = column === null || column === void 0 ? void 0 : column.dateInterv) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_DATE_INTERV,
                        hasSecond: (_b = column === null || column === void 0 ? void 0 : column.dateHasSecond) !== null && _b !== void 0 ? _b : false,
                        adapterLocale: dateAdapterLocale,
                    });
                }
                return constants_1.EMPTY_VALUE_DISPLAY;
            },
        };
    };
}
