import React from 'react';
import classNames from 'classnames';
import InternationalIcon from './InternationalIcon';
import Flag from './Flag';
export function createCountryIconComponent(_ref) {
  var flags = _ref.flags,
      flagUrl = _ref.flagUrl,
      FlagComponent = _ref.flagComponent,
      InternationalIcon = _ref.internationalIcon;
  return function CountryIcon(_ref2) {
    var country = _ref2.country,
        label = _ref2.label;
    return React.createElement("div", {
      className: classNames('PhoneInputCountryIcon', {
        'PhoneInputCountryIcon--border': country
      })
    }, country ? React.createElement(FlagComponent, {
      country: country,
      countryName: label,
      flags: flags,
      flagUrl: flagUrl
    }) : React.createElement(InternationalIcon, {
      title: label
    }));
  };
}
export default createCountryIconComponent({
  // Must be equal to `defaultProps.flagUrl` in `./PhoneInputWithCountry.js`.
  flagUrl: 'https://catamphetamine.github.io/react-phone-number-input/flags/3x2/{0}.svg',
  flagComponent: Flag,
  internationalIcon: InternationalIcon
});
//# sourceMappingURL=CountryIcon.js.map