"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledCountrySelectDropdownDialcodeColumn = exports.StyledCountrySelectDropdownNameColumn = exports.StyledCountrySelectDropdownFlagColumn = exports.StyledCountrySelectDropdownListItem = exports.StyledCountrySelectDropdownContainer = exports.StyledCountrySelectContainer = exports.StyledDialCode = exports.StyledRoot = exports.StyledFlagContainer = void 0;

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

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

var _index2 = require("../menu/index.js");

var _index3 = require("../select/index.js");

var _defaultProps = _interopRequireDefault(require("../select/default-props.js"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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 StyledFlagContainer = (0, _index.styled)('span', function (_ref) {
  var _sizeToFont;

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

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