import type { Input } from "@earendil-works/pi-tui";
import type { QuestionnaireState } from "../state/state.ts";
import type { QuestionData } from "../tool/types.ts";
import type { BoundGlobalBinding, BoundPerTabBinding } from "./component-binding.ts";
import type { WrappingSelectItem } from "./components/wrapping-select.ts";
import type { TabComponents } from "./tab-components.ts";
/** Cache-invalidation contract used by the adapter. `pi-tui` `Component` already satisfies it. */
interface Invalidatable {
    invalidate(): void;
}
export interface QuestionnairePropsAdapterConfig {
    tui: {
        requestRender(): void;
    };
    questions: readonly QuestionData[];
    itemsByTab: ReadonlyArray<readonly WrappingSelectItem[]>;
    tabsByIndex: ReadonlyArray<TabComponents>;
    inlineInput: Input;
    globalBindings: ReadonlyArray<BoundGlobalBinding>;
    perTabBindings: ReadonlyArray<BoundPerTabBinding>;
    /**
     * Renderables not reached by the binding registries (e.g. the notes
     * `Input`, which is typed into directly and has no props). Walked by
     * `invalidate()` after the binding-driven components.
     */
    extraInvalidatables?: ReadonlyArray<Invalidatable>;
}
/**
 * View fan-out: drives every component setter from the canonical state via
 * two binding registries. `globalBindings` covers the cross-tab components
 * (chatRow, dialog, submitPicker?, tabBar?); `perTabBindings` covers the
 * per-tab kinds (optionList, preview, multiSelect?). The hand-coded fan-out
 * collapses to one global loop + one nested per-tab loop. The inline-Other
 * value is read from the headless `inlineInput` instance per tick into ctx so
 * `selectOptionListProps` sees the live value.
 */
export declare class QuestionnairePropsAdapter {
    private readonly tui;
    private readonly questions;
    private readonly itemsByTab;
    private readonly tabsByIndex;
    private readonly inlineInput;
    private readonly globalBindings;
    private readonly perTabBindings;
    private readonly extraInvalidatables;
    constructor(config: QuestionnairePropsAdapterConfig);
    apply(state: QuestionnaireState): void;
    /**
     * Invalidates every owned renderable. Called by the session in place of
     * the old `dialog.invalidate()` forwarding chain — DialogView no longer
     * reaches into siblings (chatRow, tabBar, notesInput, activePreviewPane).
     * Iterates the same registries used by `apply()` plus
     * `extraInvalidatables` for components outside the binding system.
     */
    invalidate(): void;
}
export {};
//# sourceMappingURL=props-adapter.d.ts.map