import * as React from 'react'; export declare const AG_STATES: readonly ["open", "closed", "checked", "unchecked", "indeterminate", "active", "inactive", "on", "off", "expanded", "collapsed", "loading", "idle"]; export type AgState = (typeof AG_STATES)[number]; interface StateFlagValues { open: boolean; checked: boolean | 'mixed'; active: boolean; /** toggle/button pressed — emits 'on' | 'off' */ pressed: boolean; expanded: boolean; loading: boolean; } type FlagKey = keyof StateFlagValues; /** Exactly one state flag per call (REQ-CMP-07: one normalised value per part). Passing two flags is a type error; `undefined` omits the attribute. */ export type DataStateFlags = { [K in FlagKey]: { [P in K]?: StateFlagValues[P] | undefined; } & { [P in Exclude]?: never; }; }[FlagKey]; /** * Maps one component state flag to the shared vocabulary: open->'open'|'closed', * checked->'checked'|'unchecked'|('mixed'->'indeterminate'), active->'active'|'inactive', * pressed->'on'|'off', expanded->'expanded'|'collapsed', loading->'loading'|'idle'. * Always a single AG_STATES value (never space-joined); undefined when the flag is * unset so the attribute is omitted entirely. A caller that bypasses the type and * passes several flags gets a dev error and the first flag's value. */ export declare function toDataState(flags: DataStateFlags): AgState | undefined; /** * BU render-state adapter (REQ-CMP-07): BU parts receive their state as the * second arg of a `render` callback — this wraps a part's render so the * normalised single-value `data-state` lands on the rendered element without * extra local state. `toState` must return exactly one AG_STATES value. */ type BURender = unknown; export declare function stateRender(toState: (state: S) => string | undefined, render: BURender, tag?: keyof React.JSX.IntrinsicElements): (props: object, state: S) => React.ReactElement; export {};