import { TopBarVariant } from '../types'; import { FormEnhancements } from '../types/form-builder'; import { ControlModel, ControlModelBinding, ControlSchema, ControlWorkspaceOptions, UseControlWorkspaceReturn } from './useControlSchema'; /** * Merges `initialValues`/external `modelValue`/`values` on top of a base * `ControlWorkspaceOptions.initialValues`, matching the layering FormBuilder expects: base * defaults, then caller-supplied initial values, then live external values win last. Shared by * {@link controlWorkspaceProps} and {@link bioTemplatePresetWorkspaceProps} so both "generate a * workspace from options, initialValues, and v-model" views merge options identically. */ export declare function resolveControlOptionsWithExternalValues(base: TOptions, initialValues: Record | undefined, externalValues: Record | undefined): TOptions; export interface ControlWorkspaceModelProps { model?: ControlModel | ControlModelBinding; controls?: ControlSchema; controlOptions?: ControlWorkspaceOptions; initialValues?: Record; modelValue?: Record; values?: Record; } export interface ResolvedControlWorkspaceModel { /** `modelValue` if provided, else `values` — the single external v-model source of truth. */ externalValues: Record | undefined; /** `model` resolved through `resolveControlModel()`, or undefined for a raw `controls` schema. */ resolvedModel: ControlModelBinding | undefined; /** `controls` if provided, else the resolved model's controls, else `{}`. */ resolvedControls: ControlSchema; /** `controlOptions` merged over the resolved model's own options, with initialValues/external values layered on top. */ resolvedControlOptions: ControlWorkspaceOptions; } /** * Resolves ControlWorkspaceView's `model`/`controls`/`controlOptions`/`initialValues`/ * `modelValue`/`values` props into the schema + options pair `useControlWorkspace()` needs. * Pure and framework-free so callers wrap each field in their own `computed()`. * * @example Recommended * ```ts * const resolved = computed(() => controlWorkspaceProps(props)) * const resolvedControls = computed(() => resolved.value.resolvedControls) * ``` */ export declare function controlWorkspaceProps(props: ControlWorkspaceModelProps): ResolvedControlWorkspaceModel; export interface DoseDesignWorkspacePassthroughProps { workspace?: UseControlWorkspaceReturn; controlOptions?: ControlWorkspaceOptions; initialValues?: Record; modelValue?: Record; values?: Record; title?: string; subtitle?: string; topBarVariant?: TopBarVariant; sidebarWidth?: string; /** @deprecated No-op, removed in MINT 1.4. AppSidebar has one look now. */ sidebarVariant?: 'default' | 'analysis'; responsiveSidebar?: boolean; sidebarPosition?: 'left' | 'right'; sidebarTitle?: string; sidebarSubtitle?: string; sidebarBadge?: string | number; floating?: boolean; dense?: boolean; showSettings?: boolean; showFormActions?: boolean; formEnhancements?: FormEnhancements>; formLoading?: boolean; formDisabled?: boolean; formReadonly?: boolean; formSize?: 'sm' | 'md' | 'lg'; } /** * Maps DoseDesignWorkspaceView's props straight through to the identically-named * ControlWorkspaceView props it wraps — the ~25-key pass-through list that used to be spelled * out attribute-by-attribute in the template. `model` is the caller's already-resolved dose * design model, not the raw (possibly absent) `props.model`. * * @example Recommended * ```vue * * ``` */ export declare function doseDesignWorkspaceProps(props: DoseDesignWorkspacePassthroughProps, model: ControlModel | ControlModelBinding): { model: ControlModel | ControlModelBinding; workspace: UseControlWorkspaceReturn | undefined; controlOptions: ControlWorkspaceOptions | undefined; initialValues: Record | undefined; modelValue: Record | undefined; values: Record | undefined; title: string | undefined; subtitle: string | undefined; topBarVariant: TopBarVariant | undefined; sidebarWidth: string | undefined; sidebarVariant: "default" | "analysis" | undefined; responsiveSidebar: boolean | undefined; sidebarPosition: "left" | "right" | undefined; sidebarTitle: string | undefined; sidebarSubtitle: string | undefined; sidebarBadge: string | number | undefined; floating: boolean | undefined; dense: boolean | undefined; showSettings: boolean | undefined; showFormActions: boolean | undefined; formEnhancements: FormEnhancements> | undefined; formLoading: boolean | undefined; formDisabled: boolean | undefined; formReadonly: boolean | undefined; formSize: "sm" | "md" | "lg" | undefined; }; export interface BioTemplateExperimentWorkspaceStatusProps { status?: { loading?: boolean; saving?: boolean; error?: string | null; hasExperiment?: boolean; currentExperimentId?: number; lastLoadedAt?: Date | null; lastSavedAt?: Date | null; }; loading?: boolean; error?: string | null; hasExperiment?: boolean; currentExperimentId?: number; lastLoadedAt?: Date | null; lastSavedAt?: Date | null; } export interface ResolvedBioTemplateExperimentStatus { loading: boolean; error: string | null | undefined; hasExperiment: boolean; currentExperimentId: number | undefined; lastLoadedAt: Date | null | undefined; lastSavedAt: Date | null | undefined; } /** * Merges BioTemplateExperimentWorkspaceView's grouped `status` prop over its individual * `loading`/`error`/`hasExperiment`/... props: `status` wins whenever the corresponding field * on it is set, otherwise the flat prop (or its default) is used. Centralizes the six * independent fallback rules generated plugin pages rely on when they pass a request/experiment * `status` object instead of wiring each field by hand. */ export declare function bioTemplateExperimentWorkspaceProps(props: BioTemplateExperimentWorkspaceStatusProps): ResolvedBioTemplateExperimentStatus; export interface BioTemplatePackWorkspacePassthroughProps { message?: string; dense?: boolean; readonly?: boolean; showStatus?: boolean; showTemplateSummary?: boolean; loadLabel?: string; resetLabel?: string; saveLabel?: string; } /** * Assembles the prop object BioTemplatePackWorkspaceView binds onto the * BioTemplateExperimentWorkspaceView it wraps: its own display props passed straight through, * plus the pack-derived `target`/`label`/`status`/`actions` computed by the caller. */ export declare function bioTemplatePackWorkspaceProps(props: BioTemplatePackWorkspacePassthroughProps, derived: { target: TTarget; label: string; status: TStatus; actions: TActions; }): { target: TTarget; kind: "collection"; label: string; message: string | undefined; status: TStatus; actions: TActions; dense: boolean | undefined; readonly: boolean | undefined; showStatus: boolean | undefined; showTemplateSummary: boolean | undefined; loadLabel: string | undefined; resetLabel: string | undefined; saveLabel: string | undefined; }; export interface BioTemplatePresetWorkspaceOptionsProps { workspaceOptions?: TOptions; initialValues?: Record; modelValue?: Record; values?: Record; } /** * Resolves BioTemplatePresetWorkspaceView's `workspaceOptions`/`initialValues`/`modelValue`/ * `values` props into the single options object `useBioTemplatePresetWorkspace()` needs, * reusing the same base/initialValues/external-values layering as {@link controlWorkspaceProps}. */ export declare function bioTemplatePresetWorkspaceProps(props: BioTemplatePresetWorkspaceOptionsProps): { externalValues: Record | undefined; resolvedWorkspaceOptions: TOptions; };