import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue'; import { FileBrowserSortKey, FileEntry, FilePathCrumb, FileSelection, ServerMount } from '../types/fileBrowserTypes'; export interface UseFileBrowserOptions { /** Extensions the caller cares about; entries are flagged, never removed. */ typeRules?: MaybeRefOrGetter; /** Mount to open first; defaults to the first available one. */ initialMountId?: MaybeRefOrGetter; /** Override the platform API base URL (standalone plugin dev). */ apiBaseUrl?: string; } export interface UseFileBrowserReturn { /** Every configured mount, offline ones included. */ mounts: Ref; /** Mount the current listing belongs to. */ mountId: Ref; /** Mount-relative path of the current listing. */ path: Ref; /** Parent path, or null at a mount root. */ parent: Ref; entries: Ref; breadcrumbs: Ref; /** Directory size before any search filter. */ totalCount: Ref; /** How many entries satisfy the type rules. */ matchCount: Ref; /** How many rows this listing carries, after search and any cap. */ shownCount: Ref; /** True when the server capped the listing. */ truncated: Ref; search: Ref; sort: Ref; /** Paths the user has picked, keyed by mount and path. */ selected: Ref; isLoading: ComputedRef; error: Ref; /** Load the mount list and open the first available mount. */ init: () => Promise; /** Open a directory, or a mount root when path is empty. */ navigate: (location: { mount_id: string; path: string; }) => Promise; /** Re-read the current directory. */ refresh: () => Promise; /** Take the directory currently being viewed as the input. */ selectCurrentFolder: () => void; clear: () => void; } /** * Browses the platform's `/api/filesystem` routes for a custom file UI. For the * ready-made dialog, use `FilePicker` with `usePlatformFilePickerAdapter()`. * * Requires the `filesystem.browse` permission and a deployment that declares * mounts; with none configured the routes are absent and `mounts` stays empty. */ export declare function useFileBrowser(options?: UseFileBrowserOptions): UseFileBrowserReturn;