import type { PageModel } from '../editor/store.js'; /** * Sibling states of one screen are a host declaration: pages that share a * scenario belong together (see `editor/screenStateGroups.ts`). The core never * infers membership from names, routes, or canvas proximity, so a screen * without a scenario simply has no siblings to flip to. */ export interface ScreenStateMember { page: PageModel; screenId: string; /** The declared state label; an undeclared state is the default one. */ label: string; /** Host-declared kind of the state branch (overlay, badge, layout, …), presentation only. */ kind?: string; current: boolean; } export interface ScreenStateGroup { /** The shared scenario declaration. */ key: string; /** The default member's name, or the first declared member's. */ name: string; members: readonly ScreenStateMember[]; } export declare const isScreenPage: (page: PageModel) => boolean; export declare const screenStateLabel: (page: PageModel) => string; /** * The declared states of the screen `screenId` belongs to, default state first * and then in declaration order. Hidden siblings (other runtimes or conditions) * are left out; the current state always stays. Returns null when the screen * is unknown or declares no scenario. */ export declare function screenStateGroup(pages: readonly PageModel[], screenId: string, isVisible?: (page: PageModel) => boolean): ScreenStateGroup | null;