import type { QuestionData } from "../../tool/types.js"; import type { PreviewPaneProps } from "../../view/components/preview/preview-pane.js"; import type { WrappingSelectItem } from "../../view/components/wrapping-select.js"; import type { ActiveView, StatefulView } from "../../view/stateful-view.js"; import type { TabComponents } from "../../view/tab-components.js"; import type { QuestionnaireState } from "../state.js"; export interface BindingContext { readonly questions: readonly QuestionData[]; readonly itemsByTab: ReadonlyArray; readonly totalQuestions: number; readonly activeView: ActiveView; readonly inputBuffer: string; readonly inputCursorOffset: number | undefined; readonly activePreviewPane: StatefulView; } export interface PerTabBindingContext extends BindingContext { readonly tab: TabComponents; readonly i: number; } export type GlobalSelector

= (state: QuestionnaireState, ctx: BindingContext) => P; export type PerTabSelector

= (state: QuestionnaireState, ctx: PerTabBindingContext) => P;