import { baseUniDriverFactory } from '../../unidriver';
import { CollectionToolbarUniDriver } from '../CollectionToolbar/CollectionToolbar.uni.driver';
import { TableUniDriver } from '../Table/Table.uni.driver';
import { GridUniDriver } from '../Grid/Grid.uni.driver';
import { EditableTableUniDriver } from '../EditableTable/EditableTable.uni.driver';
export function LayoutSwitchUniDriver(base, body) {
    const getToolbar = () => CollectionToolbarUniDriver(base.$('[data-hook="collection-toolbar"]'), body);
    return {
        ...baseUniDriverFactory(base),
        wait: (timeout) => base.wait(timeout),
        /** Get the layout switch button */
        getSwitchButton: () => getToolbar().getSwitchButton(),
        /** Check if the table layout is currently shown */
        isShowingTable: () => base.$('[data-hook="layout-view-table"]').exists(),
        /** Check if the grid layout is currently shown */
        isShowingGrid: () => base.$('[data-hook="layout-view-grid"]').exists(),
        /** Check if the spreadsheet layout is currently shown */
        isShowingSpreadsheet: () => base.$('[data-hook="layout-view-spreadsheet"]').exists(),
        /** Get Table driver */
        getTable: () => TableUniDriver(base, body),
        /** Get Grid driver */
        getGrid: () => GridUniDriver(base, body),
        /** Get Spreadsheet (EditableTable) driver */
        getSpreadsheet: () => EditableTableUniDriver(base, body),
    };
}
export default LayoutSwitchUniDriver;
//# sourceMappingURL=LayoutSwitch.uni.driver.js.map