"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _base = _interopRequireDefault(require("@emotion/styled/base"));
var _react = _interopRequireDefault(require("react"));
var _decapCmsUiDefault = require("decap-cms-ui-default");
var _ViewStyleControl = _interopRequireDefault(require("./ViewStyleControl"));
var _SortControl = _interopRequireDefault(require("./SortControl"));
var _FilterControl = _interopRequireDefault(require("./FilterControl"));
var _GroupControl = _interopRequireDefault(require("./GroupControl"));
var _react2 = require("@emotion/react");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const CollectionControlsContainer = /*#__PURE__*/(0, _base.default)("div", {
  target: "emfmed70",
  label: "CollectionControlsContainer"
})("display:flex;align-items:center;flex-direction:row-reverse;margin-top:22px;width:", _decapCmsUiDefault.lengths.topCardWidth, ";max-width:100%;&>div{margin-left:6px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NvbGxlY3Rpb24vQ29sbGVjdGlvbkNvbnRyb2xzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVM4QyIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMvY29tcG9uZW50cy9Db2xsZWN0aW9uL0NvbGxlY3Rpb25Db250cm9scy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBsZW5ndGhzIH0gZnJvbSAnZGVjYXAtY21zLXVpLWRlZmF1bHQnO1xuXG5pbXBvcnQgVmlld1N0eWxlQ29udHJvbCBmcm9tICcuL1ZpZXdTdHlsZUNvbnRyb2wnO1xuaW1wb3J0IFNvcnRDb250cm9sIGZyb20gJy4vU29ydENvbnRyb2wnO1xua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C8+XG4gICAgICApfVxuICAgICAge3ZpZXdGaWx0ZXJzLmxlbmd0aCA+IDAgJiYgKFxuICAgICAgICA8RmlsdGVyQ29udHJvbFxuICAgICAgICAgIHZpZXdGaWx0ZXJzPXt2aWV3RmlsdGVyc31cbiAgICAgICAgICBvbkZpbHRlckNsaWNrPXtvbkZpbHRlckNsaWNrfVxuICAgICAgICAgIHQ9e3R9XG4gICAgICAgICAgZmlsdGVyPXtmaWx0ZXJ9XG4gICAgICAgIC8+XG4gICAgICApfVxuICAgICAge3NvcnRhYmxlRmllbGRzLmxlbmd0aCA+IDAgJiYgKFxuICAgICAgICA8U29ydENvbnRyb2wgZmllbGRzPXtzb3J0YWJsZUZpZWxkc30gc29ydD17c29ydH0gb25Tb3J0Q2xpY2s9e29uU29ydENsaWNrfSAvPlxuICAgICAgKX1cbiAgICA8L0NvbGxlY3Rpb25Db250cm9sc0NvbnRhaW5lcj5cbiAgKTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29sbGVjdGlvbkNvbnRyb2xzO1xuIl19 */"));
function CollectionControls({
  viewStyle,
  onChangeViewStyle,
  sortableFields,
  onSortClick,
  sort,
  viewFilters,
  viewGroups,
  onFilterClick,
  onGroupClick,
  t,
  filter,
  group
}) {
  return (0, _react2.jsx)(CollectionControlsContainer, null, (0, _react2.jsx)(_ViewStyleControl.default, {
    viewStyle: viewStyle,
    onChangeViewStyle: onChangeViewStyle
  }), viewGroups.length > 0 && (0, _react2.jsx)(_GroupControl.default, {
    viewGroups: viewGroups,
    onGroupClick: onGroupClick,
    t: t,
    group: group
  }), viewFilters.length > 0 && (0, _react2.jsx)(_FilterControl.default, {
    viewFilters: viewFilters,
    onFilterClick: onFilterClick,
    t: t,
    filter: filter
  }), sortableFields.length > 0 && (0, _react2.jsx)(_SortControl.default, {
    fields: sortableFields,
    sort: sort,
    onSortClick: onSortClick
  }));
}
var _default = exports.default = CollectionControls;