"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledRoot = exports.StyledLabelSublistContent = exports.StyledLabelDescription = exports.StyledLabelContent = exports.StyledHeadingSubHeading = exports.StyledHeadingRoot = exports.StyledHeadingMainHeading = exports.StyledHeadingEndEnhancerDescriptionContainer = exports.StyledHeadingEndEnhancerContainer = exports.StyledHeadingContentRow = exports.StyledHeadingContent = exports.StyledEndEnhancerContainer = exports.StyledContent = exports.StyledArtworkContainer = void 0;

var _styles = require("../styles");

var _utils = require("./utils");

var _constants = require("./constants");

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var StyledRoot = (0, _styles.styled)('li', function (_ref) {
  var $theme = _ref.$theme,
      $shape = _ref.$shape;
  return {
    alignItems: 'center',
    backgroundColor: $theme.colors.backgroundPrimary,
    display: 'flex',
    listStyleType: 'none',
    width: '100%',
    borderTopLeftRadius: $shape === _constants.SHAPE.ROUND ? $theme.borders.radius400 : 0,
    borderTopRightRadius: $shape === _constants.SHAPE.ROUND ? $theme.borders.radius400 : 0,
    borderBottomLeftRadius: $shape === _constants.SHAPE.ROUND ? $theme.borders.radius400 : 0,
    borderBottomRightRadius: $shape === _constants.SHAPE.ROUND ? $theme.borders.radius400 : 0,
    overflow: 'hidden'
  };
});
exports.StyledRoot = StyledRoot;
StyledRoot.displayName = "StyledRoot";
var StyledContent = (0, _styles.styled)('div', function (_ref2) {
  var $mLeft = _ref2.$mLeft,
      $sublist = _ref2.$sublist,
      $theme = _ref2.$theme;
  return _objectSpread(_objectSpread({}, (0, _styles.expandBorderStyles)($theme.borders.border100)), {}, {
    alignItems: 'center',
    borderTopStyle: 'none',
    borderRightStyle: 'none',
    borderLeftStyle: 'none',
    display: 'flex',
    flexGrow: 1,
    minHeight: $sublist ? 'initial' : $theme.sizing.scale1600,
    justifyContent: 'space-between'
  }, $theme.direction === 'rtl' ? {
    paddingLeft: $theme.sizing.scale600,
    marginRight: $mLeft ? $theme.sizing.scale600 : null
  } : {
    paddingRight: $theme.sizing.scale600,
    marginLeft: $mLeft ? $theme.sizing.scale600 : null
  });
});
exports.StyledContent = StyledContent;
StyledContent.displayName = "StyledContent";
var StyledEndEnhancerContainer = (0, _styles.styled)('div', {
  alignItems: 'center',
  display: 'flex'
});
exports.StyledEndEnhancerContainer = StyledEndEnhancerContainer;
StyledEndEnhancerContainer.displayName = "StyledEndEnhancerContainer";
var StyledArtworkContainer = (0, _styles.styled)('div', function (_ref3) {
  var $artworkSize = _ref3.$artworkSize,
      $sublist = _ref3.$sublist,
      $theme = _ref3.$theme;
  var sizeValue = typeof $artworkSize === 'number' ? $artworkSize : (0, _utils.artworkSizeToValue)($artworkSize, Boolean($sublist));

  if (sizeValue > 36) {
    return {
      alignItems: 'center',
      display: 'flex',
      paddingLeft: $theme.sizing.scale600,
      paddingRight: $theme.sizing.scale600
    };
  }

  return {
    alignItems: 'center',
    display: 'flex',
    justifyContent: 'center',
    width: $theme.sizing.scale1600
  };
});
exports.StyledArtworkContainer = StyledArtworkContainer;
StyledArtworkContainer.displayName = "StyledArtworkContainer";
var StyledLabelContent = (0, _styles.styled)('p', function (_ref4) {
  var $theme = _ref4.$theme;
  return _objectSpread(_objectSpread({}, $theme.typography.LabelMedium), {}, {
    color: $theme.colors.contentPrimary,
    marginTop: 0,
    marginBottom: 0
  });
});
exports.StyledLabelContent = StyledLabelContent;
StyledLabelContent.displayName = "StyledLabelContent";
var StyledLabelDescription = (0, _styles.styled)('p', function (_ref5) {
  var $theme = _ref5.$theme;
  return _objectSpread(_objectSpread({}, $theme.typography.ParagraphSmall), {}, {
    color: $theme.colors.contentPrimary,
    marginTop: 0,
    marginBottom: 0
  });
});
exports.StyledLabelDescription = StyledLabelDescription;
StyledLabelDescription.displayName = "StyledLabelDescription";
var StyledLabelSublistContent = (0, _styles.styled)('p', function (_ref6) {
  var $theme = _ref6.$theme;
  return _objectSpread(_objectSpread({}, $theme.typography.LabelMedium), {}, {
    color: $theme.colors.contentPrimary,
    marginTop: $theme.sizing.scale500,
    marginBottom: $theme.sizing.scale500
  });
});
exports.StyledLabelSublistContent = StyledLabelSublistContent;
StyledLabelSublistContent.displayName = "StyledLabelSublistContent";
var StyledHeadingRoot = (0, _styles.styled)('div', function (_ref7) {
  var $theme = _ref7.$theme;
  return {
    display: 'flex',
    alignItems: 'center',
    width: '100%',
    backgroundColor: $theme.colors.backgroundPrimary,
    overflow: 'hidden',
    minHeight: $theme.sizing.scale1600
  };
});
exports.StyledHeadingRoot = StyledHeadingRoot;
StyledHeadingRoot.displayName = "StyledHeadingRoot";
var StyledHeadingContent = (0, _styles.styled)('div', function (_ref8) {
  var $theme = _ref8.$theme;
  return _objectSpread({
    flexGrow: 1,
    width: '100%',
    minWidth: 0,
    paddingTop: $theme.sizing.scale600,
    paddingBottom: $theme.sizing.scale300
  }, $theme.direction === 'rtl' ? {
    paddingLeft: $theme.sizing.scale600,
    marginRight: $theme.sizing.scale600
  } : {
    paddingRight: $theme.sizing.scale600,
    marginLeft: $theme.sizing.scale600
  });
});
exports.StyledHeadingContent = StyledHeadingContent;
StyledHeadingContent.displayName = "StyledHeadingContent";
var StyledHeadingContentRow = (0, _styles.styled)('div', {
  display: 'flex',
  justifyContent: 'space-between',
  width: '100%'
});
exports.StyledHeadingContentRow = StyledHeadingContentRow;
StyledHeadingContentRow.displayName = "StyledHeadingContentRow";
var StyledHeadingMainHeading = (0, _styles.styled)('p', function (_ref9) {
  var _ref9$$maxLines = _ref9.$maxLines,
      $maxLines = _ref9$$maxLines === void 0 ? 1 : _ref9$$maxLines,
      $theme = _ref9.$theme;
  return _objectSpread(_objectSpread({}, $theme.typography.HeadingSmall), {}, {
    color: $theme.colors.contentPrimary,
    marginTop: 0,
    marginBottom: 0,
    marginRight: $theme.sizing.scale600,
    display: '-webkit-box',
    '-webkit-line-clamp': $maxLines,
    '-webkit-box-orient': 'vertical',
    overflow: 'hidden'
  });
});
exports.StyledHeadingMainHeading = StyledHeadingMainHeading;
StyledHeadingMainHeading.displayName = "StyledHeadingMainHeading";
var StyledHeadingSubHeading = (0, _styles.styled)('p', function (_ref10) {
  var _ref10$$maxLines = _ref10.$maxLines,
      $maxLines = _ref10$$maxLines === void 0 ? 1 : _ref10$$maxLines,
      $theme = _ref10.$theme;
  return _objectSpread(_objectSpread({}, $theme.typography.ParagraphLarge), {}, {
    color: $theme.colors.contentPrimary,
    marginTop: 0,
    marginBottom: 0,
    marginRight: $theme.sizing.scale600,
    display: '-webkit-box',
    '-webkit-line-clamp': $maxLines,
    '-webkit-box-orient': 'vertical',
    overflow: 'hidden'
  });
});
exports.StyledHeadingSubHeading = StyledHeadingSubHeading;
StyledHeadingSubHeading.displayName = "StyledHeadingSubHeading";
var StyledHeadingEndEnhancerContainer = (0, _styles.styled)('div', function (_ref11) {
  var $isText = _ref11.$isText,
      $theme = _ref11.$theme;
  return _objectSpread(_objectSpread({}, $theme.typography.LabelMedium), {}, {
    display: 'flex',
    alignItems: $isText ? 'flex-end' : 'center',
    whiteSpace: 'nowrap',
    overflow: 'hidden',
    textOverflow: 'ellipsis'
  });
});
exports.StyledHeadingEndEnhancerContainer = StyledHeadingEndEnhancerContainer;
StyledHeadingEndEnhancerContainer.displayName = "StyledHeadingEndEnhancerContainer";
var StyledHeadingEndEnhancerDescriptionContainer = (0, _styles.styled)('p', function (_ref12) {
  var $theme = _ref12.$theme;
  return _objectSpread(_objectSpread({}, $theme.typography.ParagraphMedium), {}, {
    marginTop: 0,
    marginBottom: 0,
    display: 'flex',
    alignItems: 'flex-start',
    whiteSpace: 'nowrap',
    overflow: 'hidden',
    textOverflow: 'ellipsis'
  });
});
exports.StyledHeadingEndEnhancerDescriptionContainer = StyledHeadingEndEnhancerDescriptionContainer;
StyledHeadingEndEnhancerDescriptionContainer.displayName = "StyledHeadingEndEnhancerDescriptionContainer";