"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Content = exports.ToggleIcon = exports.Header = exports.PanelContainer = exports.Root = void 0;

var _index = require("../styles/index.js");

var _styledComponents = require("../icon/styled-components.js");

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, 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; }

/**
 * Main component container element
 */
var Root = (0, _index.styled)('div', {});
exports.Root = Root;
Root.displayName = "Root";
var PanelContainer = (0, _index.styled)('div', {
  width: '100%'
});
exports.PanelContainer = PanelContainer;
PanelContainer.displayName = "PanelContainer";
var Header = (0, _index.styled)('div', function (props) {
  var $disabled = props.$disabled,
      $expanded = props.$expanded,
      _props$$theme = props.$theme,
      colors = _props$$theme.colors,
      sizing = _props$$theme.sizing,
      typography = _props$$theme.typography;
  return _objectSpread({}, typography.font450, {
    color: colors.colorPrimary,
    cursor: $disabled ? 'not-allowed' : 'pointer',
    background: colors.listHeaderFill,
    paddingTop: sizing.scale600,
    paddingBottom: sizing.scale600,
    paddingLeft: sizing.scale700,
    paddingRight: sizing.scale700,
    marginTop: 0,
    marginBottom: 0,
    marginLeft: 0,
    marginRight: 0,
    borderBottom: "1px solid ".concat($expanded ? colors.mono500 : colors.mono400),
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'space-between',
    ':hover': {
      color: colors.primary
    }
  });
});
exports.Header = Header;
Header.displayName = "Header";
var ToggleIcon = (0, _index.styled)('svg', function (props) {
  var $theme = props.$theme,
      $disabled = props.$disabled,
      $color = props.$color;
  return _objectSpread({}, (0, _styledComponents.getSvgStyles)(props), {
    color: $color || $theme.colors.foreground,
    cursor: $disabled ? 'not-allowed' : 'pointer'
  });
});
exports.ToggleIcon = ToggleIcon;
ToggleIcon.displayName = "ToggleIcon";
var Content = (0, _index.styled)('div', function (props) {
  var _props$$theme2 = props.$theme,
      animation = _props$$theme2.animation,
      colors = _props$$theme2.colors,
      sizing = _props$$theme2.sizing,
      typography = _props$$theme2.typography,
      $expanded = props.$expanded;
  return _objectSpread({}, typography.font300, {
    backgroundColor: colors.listBodyFill,
    color: colors.foreground,
    paddingTop: $expanded ? sizing.scale800 : 0,
    paddingBottom: $expanded ? sizing.scale1000 : 0,
    paddingLeft: sizing.scale800,
    paddingRight: sizing.scale800,
    marginTop: 0,
    marginBottom: 0,
    marginLeft: 0,
    marginRight: 0,
    borderBottom: $expanded ? "1px solid ".concat(colors.border) : 'none',
    boxSizing: 'border-box',
    height: $expanded ? 'auto' : 0,
    maxHeight: $expanded ? '100%' : 0,
    overflow: 'hidden',
    transitionProperty: 'all',
    transitionDuration: animation.timing400,
    transitionTimingFunction: animation.easeInOutCurve
  });
});
exports.Content = Content;
Content.displayName = "Content";