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-2019 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 { SIZE } from './constants.js';
import { styled, withStyle } from '../styles/index.js';
import { StyledList } from '../menu/index.js';
import { StyledDropdownListItem, StyledRoot as SelectStyledRoot } from '../select/index.js';
import defaultProps from '../select/default-props.js';
export var StyledFlagContainer = styled('span', function (_ref) {
  var _sizeToFont;

  var _ref$$size = _ref.$size,
      $size = _ref$$size === void 0 ? SIZE.default : _ref$$size,
      sizing = _ref.$theme.sizing;
  var sizeToFont = (_sizeToFont = {}, _defineProperty(_sizeToFont, SIZE.compact, sizing.scale800), _defineProperty(_sizeToFont, SIZE.default, sizing.scale900), _defineProperty(_sizeToFont, SIZE.large, sizing.scale1000), _sizeToFont);
  return {
    fontSize: sizeToFont[$size]
  };
});
StyledFlagContainer.displayName = "StyledFlagContainer";
export var StyledRoot = withStyle(SelectStyledRoot, function (props) {
  var _sizeToWidth;

  // hard coded widths for the flag dropdown anchor
  var sizeToWidth = (_sizeToWidth = {}, _defineProperty(_sizeToWidth, SIZE.compact, '60px'), _defineProperty(_sizeToWidth, SIZE.default, '70px'), _defineProperty(_sizeToWidth, SIZE.large, '80px'), _sizeToWidth);
  return {
    width: sizeToWidth[props.$size || SIZE.default]
  };
});
StyledRoot.displayName = "StyledRoot";
export var StyledDialCode = styled('div', function (_ref2) {
  var sizing = _ref2.$theme.sizing;
  return {
    marginLeft: sizing.scale100
  };
});
StyledDialCode.displayName = "StyledDialCode";
export var StyledCountrySelectContainer = styled('div', {
  display: 'flex',
  alignItems: 'center'
});
StyledCountrySelectContainer.displayName = "StyledCountrySelectContainer";
export var StyledCountrySelectDropdownContainer = withStyle(StyledList, function (props) {
  var _props$$height = props.$height,
      $height = _props$$height === void 0 ? defaultProps.maxDropdownHeight : _props$$height;
  return {
    height: $height,
    paddingTop: 0,
    paddingBottom: 0
  };
});
StyledCountrySelectDropdownContainer.displayName = "StyledCountrySelectDropdownContainer";
export var StyledCountrySelectDropdownListItem = withStyle(StyledDropdownListItem, {
  paddingTop: 0,
  paddingBottom: 0,
  paddingLeft: 0,
  paddingRight: 0,
  display: 'flex',
  alignItems: 'center',
  height: '42px'
});
StyledCountrySelectDropdownListItem.displayName = "StyledCountrySelectDropdownListItem";
export var StyledCountrySelectDropdownFlagColumn = styled('div', function (_ref3) {
  var sizing = _ref3.$theme.sizing;
  return {
    paddingLeft: sizing.scale600,
    display: 'flex',
    alignItems: 'center'
  };
});
StyledCountrySelectDropdownFlagColumn.displayName = "StyledCountrySelectDropdownFlagColumn";
export var StyledCountrySelectDropdownNameColumn = styled('div', function (_ref4) {
  var sizing = _ref4.$theme.sizing;
  return {
    paddingLeft: sizing.scale600
  };
});
StyledCountrySelectDropdownNameColumn.displayName = "StyledCountrySelectDropdownNameColumn";
export var StyledCountrySelectDropdownDialcodeColumn = styled('div', function (_ref5) {
  var sizing = _ref5.$theme.sizing;
  return {
    paddingRight: sizing.scale600,
    marginLeft: 'auto'
  };
});
StyledCountrySelectDropdownDialcodeColumn.displayName = "StyledCountrySelectDropdownDialcodeColumn";