import type { MediaEditProps } from '../../types'; /** * A media edit control component that provides a media picker UI with upload functionality * for selecting WordPress media attachments. Supports both the traditional WordPress media * library and the experimental DataViews media modal. * * This component is intended to be used as the `Edit` property of a field definition when * registering fields with `registerEntityField` from `@wordpress/editor`. * * @template Item - The type of the item being edited. * * @param {MediaEditProps} props - The component props. * @param {Item} props.data - The item being edited. * @param {Object} props.field - The field configuration with getValue and setValue methods. * @param {Function} props.onChange - Callback function when the media selection changes. * @param {string[]} [props.allowedTypes] - Array of allowed media types. Use `['*']` to allow all file types. Default `['image']`. * @param {boolean} [props.multiple] - Whether to allow multiple media selections. Default `false`. * @param {boolean} [props.hideLabelFromVision] - Whether the label should be hidden from vision. * @param {boolean} [props.isExpanded] - Whether to render in an expanded form. Default `false`. * * @return {React.JSX.Element} The media edit control component. * * @example * ```tsx * import { MediaEdit } from '@wordpress/fields'; * import type { DataFormControlProps } from '@wordpress/dataviews'; * * const featuredImageField = { * id: 'featured_media', * type: 'media', * label: 'Featured Image', * Edit: (props: DataFormControlProps) => ( * * ), * }; * ``` */ export default function MediaEdit(props: MediaEditProps): import("react").JSX.Element; export declare function MediaEditControl({ data, field, onChange, hideLabelFromVision, allowedTypes, multiple, isExpanded, validity, isPickerFiltered, featuredImageFlow, pickerTitle, }: MediaEditProps & { /** * Whether the picker resolves through the `editor.MediaUpload` filter, so * the plugin extensions registered on it apply. */ isPickerFiltered?: boolean; /** * Opens the featured-image media frame, as the classic panel does; plugins * extending `editor.MediaUpload` recognize the featured image by it. */ featuredImageFlow?: boolean; /** * Title of the picker, in place of the field label. */ pickerTitle?: string; }): import("react").JSX.Element; //# sourceMappingURL=index.d.ts.map