var _excluded = ["leftTitle", "rightTitle", "className"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import styled from 'styled-components';
import React from 'react';
import { Flexbox, List, Typography } from '../..';
var TitleContainer = styled.div.withConfig({
  displayName: "ListWithTitles__TitleContainer",
  componentId: "sc-1mk4x8k-0"
})(["margin-bottom:", "px;"], function (p) {
  return p.theme.spacing.unit(1);
});
export var ListWithTitles = function ListWithTitles(props) {
  var leftTitle = props.leftTitle,
    rightTitle = props.rightTitle,
    className = props.className,
    restProps = _objectWithoutProperties(props, _excluded);
  return leftTitle || rightTitle ? React.createElement("div", {
    className: className
  }, React.createElement(TitleContainer, null, React.createElement(Flexbox, {
    container: true,
    gap: 0,
    justifyContent: "space-between"
  }, React.createElement(Flexbox, {
    item: true
  }, React.createElement(Typography, {
    type: "secondary",
    color: function color(t) {
      return t.color.label;
    }
  }, leftTitle)), React.createElement(Flexbox, {
    item: true
  }, React.createElement(Typography, {
    type: "secondary",
    color: function color(t) {
      return t.color.label;
    }
  }, rightTitle)))), React.createElement(List, restProps)) : React.createElement(List, _extends({
    className: className
  }, restProps));
};
ListWithTitles.displayName = 'ListWithTitles';