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; }

/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { styled } from '../styles/index.js';
import { getSvgStyles } from '../icon/styled-components.js';

/**
 * Main component container element
 */
export var Root = styled('div', function (props) {
  return {};
});
Root.displayName = "Root";
export var PanelContainer = styled('div', function (props) {
  return {
    width: '100%'
  };
});
PanelContainer.displayName = "PanelContainer";
export var Header = 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.foreground,
    cursor: $disabled ? 'not-allowed' : 'pointer',
    background: colors.listHeaderFill,
    paddingTop: sizing.scale600,
    paddingBottom: sizing.scale600,
    paddingLeft: sizing.scale700,
    paddingRight: sizing.scale1200,
    marginTop: 0,
    marginBottom: 0,
    marginLeft: 0,
    marginRight: 0,
    borderBottom: "1px solid ".concat($expanded ? colors.mono500 : colors.mono400),
    position: 'relative',
    display: 'flex',
    alignItems: 'center',
    ':hover': {
      color: colors.linkHover
    },
    ':focus': {
      backgroundColor: colors.background
    }
  });
});
Header.displayName = "Header";
export var ToggleIcon = styled('svg', function (props) {
  var $theme = props.$theme,
      $disabled = props.$disabled,
      $color = props.$color;
  return _objectSpread({}, getSvgStyles(props), {
    color: $color || $theme.colors.foreground,
    cursor: $disabled ? 'not-allowed' : 'pointer',
    position: 'absolute',
    right: '12px'
  });
});
ToggleIcon.displayName = "ToggleIcon";
export var Content = 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.background,
    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
  });
});
Content.displayName = "Content";