export function PHXFormatDateTime(isoDateString, type = 'dd/mm/yyyy') {
    if (!isoDateString)
        return '';
    const dateObj = new Date(isoDateString);
    if (isNaN(dateObj.getTime()))
        return '';
    const getDatePart = () => dateObj.toLocaleDateString('vi-VN', {
        day: '2-digit',
        month: '2-digit',
        year: 'numeric',
    });
    const getTimePart = () => dateObj.toLocaleTimeString('vi-VN', {
        hour: '2-digit',
        minute: '2-digit',
    });
    switch (type) {
        case 'dd/mm/yyyy':
            return getDatePart();
        case 'hh:mm':
            return getTimePart();
        case 'dd/mm/yyyy hh:mm':
            return `${getDatePart()} ${getTimePart()}`;
        default:
            return '';
    }
}
//# sourceMappingURL=formatDate.js.map