"use strict";

exports.__esModule = true;
exports.GridFoldersUniDriver = GridFoldersUniDriver;
exports.default = void 0;
var _unidriver = require("../../unidriver");
var _ToolbarCollectionErrorStateUni = require("../ErrorState/ToolbarCollectionErrorState.uni.driver");
var _CollectionEmptyStateUni = require("../EmptyState/CollectionEmptyState.uni.driver");
var _CollectionToolbarUni = require("../CollectionToolbar/CollectionToolbar.uni.driver");
var _unidriver2 = require("@wix/design-system/dist/testkit/unidriver");
var _GridFoldersSectionUni = require("./GridFoldersSection.uni.driver");
var _AppliedFiltersTagListUni = require("../AppliedFiltersTagList/AppliedFiltersTagList.uni.driver");
var _SummaryBarUni = require("../SummaryBar/SummaryBar.uni.driver");
function GridFoldersUniDriver(base, body) {
  const toolbarBase = () => base.$('[data-hook="collection-toolbar"]');
  const foldersSectionBase = () => base.$('[data-hook="folders-section"]');
  const itemsSectionBase = () => base.$('[data-hook="items-section"]');
  const toggleShowAllFoldersButtonBase = () => foldersSectionBase().$('[data-hook="toggle-show-all-folders-button"]');
  const toolbar = () => (0, _CollectionToolbarUni.CollectionToolbarUniDriver)(toolbarBase(), body);
  const getSummaryBar = () => (0, _SummaryBarUni.SummaryBarUniDriver)(base, body);
  return {
    ...(0, _unidriver.baseUniDriverFactory)(base),
    /** Gets a [CollectionToolbarUniDriver](./?path=/story/common-components--collectiontoolbar) */
    toolbar: () => toolbar(),
    getErrorStateByDataHook: (dataHook = 'grid-folders-error-state') => (0, _ToolbarCollectionErrorStateUni.ToolbarCollectionErrorStateUniDriver)(base.$(`[data-hook="${dataHook}"]`), body),
    getEmptyStateByDataHook: (dataHook = 'grid-folders-empty-state') => (0, _CollectionEmptyStateUni.CollectionEmptyStateUniDriver)(base.$(`[data-hook="${dataHook}"]`), body),
    getCardErrorStateByDataHook: (dataHook = 'collection-card-error-state') => (0, _ToolbarCollectionErrorStateUni.ToolbarCollectionErrorStateUniDriver)(base.$(`[data-hook="${dataHook}"]`), body),
    _toggleShowAllFoldersButton: () => (0, _unidriver2.TextButtonUniDriver)(toggleShowAllFoldersButtonBase(), body),
    /** Clicks the "Show All"/"Show Less" toggle button */
    clickToggleShowAllFoldersButton: () => toggleShowAllFoldersButtonBase().click(),
    /** Indicates the "Show All"/"Show Less" exists */
    toggleShowAllFoldersButtonExists: () => toggleShowAllFoldersButtonBase().exists(),
    /** Gets a [GridFoldersSectionUniDriver](./?path=/story/base-components-collections-gridfolders-gridfolderssection--gridfolderssection) for the folders section */
    foldersSection: () => (0, _GridFoldersSectionUni.GridFoldersSectionUniDriver)(foldersSectionBase(), body),
    /** Gets a [GridFoldersSectionUniDriver](./?path=/story/base-components-collections-gridfolders-gridfolderssection--gridfolderssection) for the items section */
    itemsSection: () => (0, _GridFoldersSectionUni.GridFoldersSectionUniDriver)(itemsSectionBase(), body),
    /** Indicates the initial skeleton loader exists */
    initialLoaderExists: () => base.$('[data-hook="initial-loader"]').exists(),
    /** Gets [CollectionSubToolbarUniDriver](./?path=/story/common-components--collectionsubtoolbar) */
    subToolbar: () => (0, _AppliedFiltersTagListUni.AppliedFiltersTagListUniDriver)(base.$('[data-hook="collection-table-sub-toolbar"]'), body),
    getSummaryBar
  };
}
var _default = exports.default = GridFoldersUniDriver;
//# sourceMappingURL=GridFolders.uni.driver.js.map