import { DEFAULT_DATE_INTERV, EMPTY_VALUE_DISPLAY } from '../constants';
import { formatDateTime } from './utils/date';
export function createDateTimeFormat(dateAdapterLocale) {
    return (column) => {
        return {
            cell(val) {
                var _a, _b;
                if (val) {
                    return formatDateTime(val, {
                        interv: (_a = column === null || column === void 0 ? void 0 : column.dateInterv) !== null && _a !== void 0 ? _a : DEFAULT_DATE_INTERV,
                        hasSecond: (_b = column === null || column === void 0 ? void 0 : column.dateHasSecond) !== null && _b !== void 0 ? _b : false,
                        adapterLocale: dateAdapterLocale,
                    });
                }
                return EMPTY_VALUE_DISPLAY;
            },
        };
    };
}
