import { j as WalkedField } from "../types-BBQaEPfE.mjs"; //#region src/core/unionMatch.d.ts /** * Pick the union option that structurally matches the supplied value. * * Heuristic only — picks by JavaScript typeof / array / object class. Returns * `undefined` when the value's shape doesn't correspond to any option (for * example a `null` value against a non-nullable union). Callers should * fall back to the first option or render an empty state in that case. */ declare function matchUnionOption(options: readonly WalkedField[], value: unknown): WalkedField | undefined; /** * Resolution of a discriminated union against a concrete value. The renderer * uses `optionLabels` to title each tab, `activeIndex` to select the open * tab, and `activeOption` as the field to render below. */ interface DiscriminatedActive { readonly optionLabels: readonly string[]; readonly activeIndex: number; readonly activeOption: WalkedField | undefined; } /** * Derive labels, active index, and active option for a discriminated union. * * For each option, the label is the discriminator property's `const` value * (when the option is an object with a literal discriminator) or, failing * that, the option's `meta.title` or its `type`. The active index is chosen * from the discriminator's value on `valueObject`; missing or non-matching * values fall back to index 0. * * Pure data transformation — no rendering concerns, no React imports. */ declare function resolveDiscriminatedActive(options: readonly WalkedField[], discriminator: string, valueObject: Record | undefined): DiscriminatedActive; //#endregion export { DiscriminatedActive, matchUnionOption, resolveDiscriminatedActive };