"use strict";

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

var _styletronReact = require("styletron-react");

var _flag = _interopRequireDefault(require("./flag.js"));

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

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

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

var _index3 = require("../select/index.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 StyledFlag = (0, _index.styled)(_flag.default, function (_ref) {
  var _sizeToWidth;

  var _ref$$size = _ref.$size,
      $size = _ref$$size === void 0 ? _constants.SIZE.default : _ref$$size,
      sizing = _ref.$theme.sizing;
  var sizeToWidth = (_sizeToWidth = {}, _defineProperty(_sizeToWidth, _constants.SIZE.compact, sizing.scale800), _defineProperty(_sizeToWidth, _constants.SIZE.default, sizing.scale900), _defineProperty(_sizeToWidth, _constants.SIZE.large, sizing.scale1000), _sizeToWidth);
  return {
    width: sizeToWidth[$size]
  };
});
exports.StyledFlag = StyledFlag;
StyledFlag.displayName = "StyledFlag";
var StyledRoot = (0, _styletronReact.withStyle)(_index3.StyledRoot, function (_ref2) {
  var _sizeToWidth2;

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