import { G as FlagResult, x as FlagMap, ao as Variant } from './types-DdEZ8iqq.mjs'; import { RolleaseBrowserClient } from './client.mjs'; import './core/metrics.mjs'; import './core/flag-types.mjs'; type Ref = { value: T; readonly __v_isRef: true; }; type ShallowRef = Ref; type ComputedRef = Ref & { readonly effect: unknown; }; type Plugin = { install: (app: AppLike, ...options: unknown[]) => void; }; type InjectionKey = symbol & { __injectionType?: T; }; type AppLike = { provide(key: InjectionKey | string | symbol, value: T): void; config: { globalProperties: Record; }; }; interface RolleasePluginOptions { /** A RolleaseBrowserClient from 'rollease/client'. */ client: RolleaseBrowserClient; } /** * Vue plugin that provides Rollease flag state to the entire component tree. * * ```ts * import { createApp } from 'vue' * import { RolleasePlugin } from 'rollease/vue' * * createApp(App).use(RolleasePlugin, { client: rlClient }).mount('#app') * ``` */ declare const RolleasePlugin: Plugin; /** * Check if a boolean flag is enabled. * * ```vue * * ``` */ declare function useFlag(key: string): { enabled: ComputedRef; isLoading: Ref; isRefetching: Ref; error: Ref; lastUpdatedAt: Ref; refetch: () => Promise; invalidate: () => Promise; }; /** * Get the variant of a multivariate flag. * * ```vue * * ``` */ declare function useVariant(key: string): { variant: ComputedRef; isLoading: Ref; isRefetching: Ref; error: Ref; lastUpdatedAt: Ref; refetch: () => Promise; }; /** * Get the typed value of a flag with a fallback default. * * ```vue * * ``` */ declare function useFlagValue(key: string, defaultValue: T): ComputedRef; /** * Get all flags as a reactive map. * * ```vue * * ``` */ declare function useFlags(): { flags: ShallowRef; isLoading: Ref; isRefetching: Ref; error: Ref; lastUpdatedAt: Ref; refetch: () => Promise; }; /** * Get full evaluation details for a specific flag. * * ```vue * * ``` */ declare function useFlagDetails(key: string): { details: ComputedRef; isLoading: Ref; error: Ref; }; /** * Access the underlying RolleaseBrowserClient instance. * * ```vue * * ``` */ declare function useRolleaseClient(): RolleaseBrowserClient; /** * Check multiple flags at once. * * ```vue * * ``` */ declare function useFlagSet(keys: string[]): ComputedRef>; export { RolleasePlugin, type RolleasePluginOptions, useFlag, useFlagDetails, useFlagSet, useFlagValue, useFlags, useRolleaseClient, useVariant };