import { TableColumnFormattedTextPageObject } from '../../testing/table-column-formatted-text.pageobject';
import { TableColumnDateTextCellView } from '../cell-view';
/**
 * Page object for date text table column.
 */
export class TableColumnDateTextPageObject extends TableColumnFormattedTextPageObject {
    getDefaultFormattedCellText(value, locale) {
        const defaultOptions = {
            dateStyle: 'medium',
            timeStyle: 'medium'
        };
        const formatter = new Intl.DateTimeFormat(locale, defaultOptions);
        return formatter.format(value);
    }
    verifyCellType(rowIndex, columnIndex) {
        const cell = this.tablePageObject.getRenderedCellView(rowIndex, columnIndex);
        if (!(cell instanceof TableColumnDateTextCellView)) {
            throw new Error('Cell is not in a date text column');
        }
    }
}
//# sourceMappingURL=table-column-date-text.pageobject.js.map