/** * WordPress dependencies */ import { BaseControl } from '@wordpress/components'; import { useInstanceId } from '@wordpress/compose'; /** * External dependencies */ import { clsx } from 'clsx'; /** * Internal dependencies */ import './editor.scss'; import type { MapStyle } from '../../types'; export type ImagePickerProps< TValue extends string > = { readonly label: string; readonly value: string; readonly options: ReadonlyArray< MapStyle< TValue > >; readonly onChange: ( value: NoInfer< TValue >, option: MapStyle< TValue > ) => void; }; export const ImagePicker = < TValue extends string >( { label, value, options, onChange, }: ImagePickerProps< TValue > ): JSX.Element => { const instanceId = useInstanceId( ImagePicker ); return ( { options.map( ( option ) => { return ( ); } ) } ); };