import { __ } from '@wordpress/i18n'; type SourceCurrencyNoticeProps = { availableCodes: Set | undefined; selectedCodes: string[]; }; export function SourceCurrencyNotice({ availableCodes, selectedCodes }: SourceCurrencyNoticeProps) { if (availableCodes == null) return null; const unavailable = selectedCodes.filter((code) => !availableCodes.has(code)); if (unavailable.length === 0) return null; return (
⚠ {__('Unavailable currencies', 'currencyrate-today-currency-blocks')} {__('The following currencies are not provided by this data source:', 'currencyrate-today-currency-blocks')}{' '} {unavailable.join(', ')}
); }