import React from 'react'; import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents'; import type { MediaClient } from '@atlaskit/media-client/media-client'; import type { MediaFeatureFlags } from '@atlaskit/media-common/types'; import { type BrowserConfig, type UploadEndEventPayload, type UploadErrorEventPayload, type UploadPreviewUpdateEventPayload, type UploadsStartEventPayload } from '../../types'; import { type LocalUploadComponentBaseProps } from '../localUploadReact'; import type { LocalUploadConfig } from '../types'; import { BrowserBase } from './BrowserBase'; export interface BrowserOwnProps { config: BrowserConfig; /** * when true, the dialog will show when the component is rendered * (NOTE: without this value, no dialog will appear unless you use the **onBrowserFn** hook) */ isOpen?: boolean; onClose?: () => void; /** * This prop will be mainly used for those contexts (like Editor) where there is no react lifecylce and we cannot rerender easily. * Otherwise, isOpen prop is preferred. */ onBrowseFn?: (browse: () => void) => void; onCancelFn?: (cancel: (uniqueIdentifier: string) => void) => void; children?: (browse: () => void) => React.ReactChild; } export type BrowseFn = () => void; export type BrowserProps = LocalUploadComponentBaseProps & BrowserOwnProps; export default BrowserBase; export declare const Browser: React.ForwardRefExoticComponent void; onPreviewUpdate?: (payload: UploadPreviewUpdateEventPayload) => void; onEnd?: (payload: UploadEndEventPayload) => void; onError?: (payload: UploadErrorEventPayload) => void; featureFlags?: MediaFeatureFlags; } & BrowserOwnProps, keyof WithAnalyticsEventsProps>, 'children' | 'onError' | 'mediaClient' | 'onUploadsStart' | 'onPreviewUpdate' | 'onEnd' | 'featureFlags' | 'isOpen' | 'onClose' | 'onBrowseFn' | 'onCancelFn'> & { config?: (LocalUploadConfig & BrowserConfig) | undefined; } & {} & React.RefAttributes, 'ref'> & React.RefAttributes>;