"use strict";

exports.__esModule = true;
exports.LayoutSwitchUniDriver = LayoutSwitchUniDriver;
exports.default = void 0;
var _unidriver = require("../../unidriver");
var _CollectionToolbarUni = require("../CollectionToolbar/CollectionToolbar.uni.driver");
var _TableUni = require("../Table/Table.uni.driver");
var _GridUni = require("../Grid/Grid.uni.driver");
var _EditableTableUni = require("../EditableTable/EditableTable.uni.driver");
function LayoutSwitchUniDriver(base, body) {
  const getToolbar = () => (0, _CollectionToolbarUni.CollectionToolbarUniDriver)(base.$('[data-hook="collection-toolbar"]'), body);
  return {
    ...(0, _unidriver.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: () => (0, _TableUni.TableUniDriver)(base, body),
    /** Get Grid driver */
    getGrid: () => (0, _GridUni.GridUniDriver)(base, body),
    /** Get Spreadsheet (EditableTable) driver */
    getSpreadsheet: () => (0, _EditableTableUni.EditableTableUniDriver)(base, body)
  };
}
var _default = exports.default = LayoutSwitchUniDriver;
//# sourceMappingURL=LayoutSwitch.uni.driver.js.map