import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue'; import { SelectOption } from '../types'; import { ExtractExperimentSamplesOptions } from './experimentDesignData'; export type ExperimentIdSource = MaybeRefOrGetter; export type ExperimentDesignDataSource = MaybeRefOrGetter | null | undefined>; export interface UseExperimentSamplesOptions extends ExtractExperimentSamplesOptions { /** Experiment id to load from `/experiments/{id}/data`; defaults to provided AppExperiment context. */ experimentId?: ExperimentIdSource; /** Pre-fetched design_data or full platform design-data response. */ designData?: ExperimentDesignDataSource; /** API base URL override for platform calls. */ apiBaseUrl?: string; /** Auto-load when an experiment id becomes available. Defaults to true. */ immediate?: boolean; /** Enable or disable automatic loading while keeping derived samples reactive. Defaults to true. */ enabled?: MaybeRefOrGetter; /** Use `useAppExperiment` provided state when `experimentId` is not set. Defaults to true. */ syncAppExperiment?: boolean; } export interface UseExperimentSamplesReturn { /** Experiment id currently used for automatic sample loading. */ experimentId: ComputedRef; /** Raw `/experiments/{id}/data` response when loaded through the platform API. */ data: Ref | null>; /** Plugin-defined design_data payload from props or platform response. */ designData: ComputedRef | null>; /** SampleSelector-compatible string values extracted from design_data. */ samples: ComputedRef; /** Select/dropdown-friendly sample options extracted from design_data. */ sampleOptions: ComputedRef[]>; isLoading: Ref; error: Ref; lastLoadedAt: Ref; /** Fetch samples for a specific experiment id, defaulting to the resolved id. */ fetch: (experimentId?: number | string | null) => Promise | null>; /** Refetch the current experiment id. */ refresh: () => Promise; /** Clear fetched platform data. */ clear: () => void; } /** Loads experiment design_data and derives samples for SampleSelector-style UIs. */ export declare function useExperimentSamples(options?: UseExperimentSamplesOptions): UseExperimentSamplesReturn;