/// import { WorkspaceElement, WorkspaceVisibility } from "edifice-ts-client"; import { MediaLibraryType, AvailableTab, MediaLibraryResult } from "./MediaLibrary"; export declare const MediaLibraryContext: import("react").Context<{ /** Application code (example: "blog") */ appCode: string; /** Visibility of the uploaded files. */ visibility?: WorkspaceVisibility | undefined; /** Allow selecting / uploading multiple files at once ? */ multiple?: boolean | undefined; /** Type of resource to search for. */ type: MediaLibraryType | null; /** Set the counter in the success button label. */ setResultCounter: (count?: number) => void; /** * Set a innertab-specific callback which gets the result when success button is clicked. */ setResult: (result?: MediaLibraryResult) => void; /** Memoize uploaded elements to be deleted on cancellation. */ setCancellable: (uploads: WorkspaceElement[]) => void; /** * Allow an innertab to switch display to another innertab. * This function will throw an error if switching failed. */ setVisibleTab: (tab: AvailableTab) => void; /** Allow an innertab to switch type of the media library. */ switchType: (type: MediaLibraryType) => void; /** * Allow an innertab to set action to execute before triggering onSuccess. */ setPreSuccess: (onSuccessAction?: () => () => Promise) => void; }>; export declare function useMediaLibraryContext(): { /** Application code (example: "blog") */ appCode: string; /** Visibility of the uploaded files. */ visibility?: WorkspaceVisibility | undefined; /** Allow selecting / uploading multiple files at once ? */ multiple?: boolean | undefined; /** Type of resource to search for. */ type: MediaLibraryType | null; /** Set the counter in the success button label. */ setResultCounter: (count?: number | undefined) => void; /** * Set a innertab-specific callback which gets the result when success button is clicked. */ setResult: (result?: any) => void; /** Memoize uploaded elements to be deleted on cancellation. */ setCancellable: (uploads: WorkspaceElement[]) => void; /** * Allow an innertab to switch display to another innertab. * This function will throw an error if switching failed. */ setVisibleTab: (tab: string) => void; /** Allow an innertab to switch type of the media library. */ switchType: (type: MediaLibraryType) => void; /** * Allow an innertab to set action to execute before triggering onSuccess. */ setPreSuccess: (onSuccessAction?: (() => () => Promise) | undefined) => void; };