"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = createCountryIconComponent;

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

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

function createCountryIconComponent(_ref) {
  var flags = _ref.flags,
      flagUrl = _ref.flagUrl,
      FlagComponent = _ref.flagComponent,
      InternationalIcon = _ref.internationalIcon;
  return function (_ref2) {
    var country = _ref2.country;
    return _react["default"].createElement("div", {
      className: (0, _classnames["default"])('PhoneInputCountryIcon', {
        'PhoneInputCountryIcon--square': country === undefined
      })
    }, country ? _react["default"].createElement(FlagComponent, {
      country: country,
      flags: flags,
      flagUrl: flagUrl
    }) : _react["default"].createElement(InternationalIcon, null));
  };
}
//# sourceMappingURL=CountryIcon.js.map