{"version":3,"file":"CountryOptionContent.cjs","names":[],"sources":["../../../src/components/PhoneInput/CountryOptionContent.tsx"],"sourcesContent":["import { useStyles } from '../../core';\nimport { PhoneInputCountryData } from './phone-data';\nimport type { PhoneInputFactory } from './PhoneInput';\n\ninterface CountryOptionContentProps {\n  country: PhoneInputCountryData;\n  renderFlag?: (country: PhoneInputCountryData | null) => React.ReactNode;\n  renderCountryOption?: (country: PhoneInputCountryData) => React.ReactNode;\n  getStyles: ReturnType<typeof useStyles<PhoneInputFactory>>;\n}\n\nexport function CountryOptionContent({\n  country,\n  renderFlag,\n  renderCountryOption,\n  getStyles,\n}: CountryOptionContentProps) {\n  if (renderCountryOption) {\n    return <>{renderCountryOption(country)}</>;\n  }\n\n  return (\n    <span {...getStyles('countryOption')}>\n      {renderFlag && renderFlag(country)}\n      <span {...getStyles('optionName')}>{country.name}</span>\n      <span {...getStyles('optionDialCode')}>+{country.dialCode}</span>\n    </span>\n  );\n}\n"],"mappings":";;;AAWA,SAAgB,qBAAqB,EACnC,SACA,YACA,qBACA,aAC4B;CAC5B,IAAI,qBACF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAA,kBAAA,UAAA,EAAA,UAAG,oBAAoB,OAAO,EAAI,CAAA;CAG3C,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;EAAM,GAAI,UAAU,eAAe;EAAnC,UAAA;GACG,cAAc,WAAW,OAAO;GACjC,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,GAAI,UAAU,YAAY;IAAI,UAAA,QAAQ;GAAW,CAAA;GACvD,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;IAAM,GAAI,UAAU,gBAAgB;IAApC,UAAA,CAAuC,KAAE,QAAQ,QAAe;;EAC5D;;AAEV"}