import { type Ref, type InjectionKey, type App } from 'vue'; import { TabSync } from '../../TabSync'; export declare const TabSyncKey: InjectionKey; /** * Vue 3 plugin for TabSync. * * @example * const app = createApp(App); * app.use(createTabSyncPlugin('my-app')); */ export declare function createTabSyncPlugin(channel?: string, options?: { debug?: boolean; }): { install(app: App): void; }; /** * Access the TabSync instance from provided context. * * @example * const sync = useTabSyncContext(); * sync.set('theme', 'dark'); */ export declare function useTabSyncContext(): TabSync; /** * Two-way reactive state synced across tabs. * Mutating the ref broadcasts the change; changes from other tabs update the ref. * * @example * const theme = useTabSync('theme', 'light'); * theme.value = 'dark'; // syncs to all tabs * * @example * // With side effect callback * const cart = useTabSync('cart', { items: [] }, (cart) => { * document.title = `Cart (${cart.items.length})`; * }); * cart.value = { items: [...cart.value.items, newItem] }; * * @example * // Form draft synced across tabs * const draft = useTabSync('email-draft', ''); * //