"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.CollectionListHeader = CollectionListHeader;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _CollectionListItem = require("../CollectionListItem");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/CollectionListHeader/CollectionListHeader.tsx";
function CollectionListHeader({
  element
}) {
  const {
    type: CollectionListItemComponent,
    props: collectionListItemProps
  } = element;
  const transformColumn = columnElement => {
    const {
      props
    } = columnElement;
    const overrides = _CollectionListItem.RowActionsColumnSlot.isElementOf(columnElement) ? {
      width: 100,
      align: 'right'
    } : {};
    const {
      title,
      width,
      align
    } = {
      ...props,
      ...overrides
    };
    return {
      title,
      width,
      align,
      value: /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 36,
          columnNumber: 14
        }
      }, props.title)
    };
  };
  return /*#__PURE__*/_react.default.createElement(CollectionListItemComponent, (0, _extends2.default)({}, collectionListItemProps, {
    transformColumn: transformColumn,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 41,
      columnNumber: 5
    }
  }));
}
//# sourceMappingURL=CollectionListHeader.js.map