/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { SelectControl, TextControl } from '@wordpress/components'; const StateControl = ( { states, currentCountry, ...props }: { states: Record< string, Record< string, string > >; currentCountry: string; } ): JSX.Element | null => { const filteredStates = states[ currentCountry ] || []; if ( filteredStates.length === 0 ) { return ( ); } return ( ( { value: code, label: state, } ) ), ] } /> ); }; export default StateControl;