"use strict";

exports.__esModule = true;
exports.CollectionToolbarActionsToolbarItemsGroup = CollectionToolbarActionsToolbarItemsGroup;
var _react = _interopRequireWildcard(require("react"));
var _designSystem = require("@wix/design-system");
var _SearchOrCustomFilter = require("./SearchOrCustomFilter");
var _InitialLoadingConditional = require("../InitialLoadingConditional");
var _CollectionToolbarSkeletonItem = require("./CollectionToolbarSkeletonItem");
var _ToolbarCollectionContext = require("../ToolbarCollectionContext");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/CollectionToolbar/CollectionToolbarActionsToolbarItemsGroup.tsx";
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
function CollectionToolbarActionsToolbarItemsGroup(props) {
  const {
    left,
    viewsToolbarItem,
    filtersElement,
    MoreFiltersButton,
    multiLevelSorting,
    customColumns,
    exportButton,
    search,
    showCustomColumnsOnTheLeft
  } = props;
  const toolbarState = (0, _ToolbarCollectionContext.useToolbarCollectionContext)();
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 27,
      columnNumber: 5
    }
  }, left ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, viewsToolbarItem && /*#__PURE__*/_react.default.createElement(_InitialLoadingConditional.InitialLoadingConditional, {
    state: toolbarState,
    loadingElement: /*#__PURE__*/_react.default.createElement(_CollectionToolbarSkeletonItem.CollectionToolbarSkeletonItem, {
      dataHook: "toolbar-views-skeleton",
      width: "100px",
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 34,
        columnNumber: 17
      }
    }),
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 13
    }
  }, viewsToolbarItem), filtersElement) : viewsToolbarItem ? filtersElement : undefined, MoreFiltersButton && /*#__PURE__*/_react.default.createElement(_designSystem.TableToolbar.Item, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 49,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(MoreFiltersButton, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 50,
      columnNumber: 11
    }
  })), customColumns && showCustomColumnsOnTheLeft && /*#__PURE__*/_react.default.createElement(_designSystem.TableToolbar.Item, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 54,
      columnNumber: 9
    }
  }, customColumns), multiLevelSorting && /*#__PURE__*/_react.default.createElement(_designSystem.TableToolbar.Item, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 57,
      columnNumber: 9
    }
  }, multiLevelSorting), exportButton && /*#__PURE__*/_react.default.createElement(_designSystem.TableToolbar.Item, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 60,
      columnNumber: 9
    }
  }, /*#__PURE__*/(0, _react.cloneElement)(exportButton, {
    toolbarType: 'default'
  })), customColumns && !showCustomColumnsOnTheLeft && /*#__PURE__*/_react.default.createElement(_designSystem.TableToolbar.Item, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 67,
      columnNumber: 9
    }
  }, customColumns), search && /*#__PURE__*/_react.default.createElement(_SearchOrCustomFilter.SearchOrCustomFilter, {
    search: search,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 70,
      columnNumber: 18
    }
  }));
}
//# sourceMappingURL=CollectionToolbarActionsToolbarItemsGroup.js.map