import { ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from 'vue'; import { OnyxFABItemProps } from '../OnyxFABItem/types.js'; export type GlobalFABProvider = { /** * Readonly list of currently active items. */ items: ComputedRef[]>; /** * add the FABOption. */ add: (item: MaybeRefOrGetter) => void; /** * removes the FABOption with the given `id`. */ remove: (id: ProvidedFABItem["id"]) => void; }; export type ProvidedFABItem = OnyxFABItemProps & { /** * Unique FABItem id used to identify the FABItem. */ id: PropertyKey; /** * How to align the item relative to the viewport. * If at least one item is left aligned, all items will be left aligned. * * @default "right" */ alignment?: "left" | "right"; /** * Overrides properties of this FAB item if it's not the only available option. * If there are multiple FAB items displayed, the properties defined here will * take precedence for *this specific item*. */ ifOption?: Partial>; /** * Callback when the FABItem is clicked. */ onClick?: () => unknown; }; export declare const GLOBAL_FAB_PROVIDER_INJECTION_KEY: InjectionKey; /** * Creates a new FABItem provider that can be used with `useGlobalFAB()`. * Should be provided once on global app level with: * * @example * ```ts * import { createGlobalFABProvider, GLOBAL_FAB_PROVIDER_INJECTION_KEY } from "sit-onyx"; * * app.provide(GLOBAL_FAB_PROVIDER_INJECTION_KEY, createGlobalFABProvider()); * ``` */ export declare const createGlobalFABProvider: () => GlobalFABProvider; /** * Composable for showing FABItems. */ export declare const useGlobalFAB: () => GlobalFABProvider;