"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.CollectionSectionHeader = void 0;
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _CollectionSectionHeaderActionBar = require("./CollectionSectionHeaderActionBar");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/CollectionSectionHeader/CollectionSectionHeader.tsx";
const CollectionSectionHeader = ({
  section,
  skin,
  dataHook,
  biComponentType
}) => {
  var _section$badge;
  const title = /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    verticalAlign: "middle",
    gap: "SP1",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 25,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Text, {
    size: "small",
    weight: "normal",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 26,
      columnNumber: 7
    }
  }, section.title), ((_section$badge = section.badge) == null ? void 0 : _section$badge.visible) && /*#__PURE__*/_react.default.createElement(_designSystem.CounterBadge, {
    truncate: false,
    skin: section.badge.skin || 'light',
    dataHook: "section-header-badge",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 30,
      columnNumber: 9
    }
  }, section.count, section.hasMore ? '+' : ''));
  return /*#__PURE__*/_react.default.createElement(_designSystem.SectionHeader, {
    dataHook: dataHook,
    title: title,
    skin: skin,
    divider: "none",
    size: "small",
    suffix: /*#__PURE__*/_react.default.createElement(_CollectionSectionHeaderActionBar.CollectionSectionHeaderActionBar, {
      section: section,
      biComponentType: biComponentType,
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 50,
        columnNumber: 9
      }
    }),
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 43,
      columnNumber: 5
    }
  });
};
exports.CollectionSectionHeader = CollectionSectionHeader;
//# sourceMappingURL=CollectionSectionHeader.js.map