import type { PackagePlacement } from "./style-utils"; export type RenderedPackage = { componentId: string; packageId: string; isSelectedByDefault: boolean; /** The sheet it renders in, or null outside sheets. */ sheetId: string | null; visible: boolean; /** Whether it shows both before and once it's selected, so it can take over the selection. */ selectable: boolean; }; /** * The package to select instead of `current` when a rule hides every copy of * it on screen, or `undefined` to keep it. The replacement is a tab's authored * default, then one outside the tabs, then the first selectable package in a * tab, then outside. The selection stays when no copy is on screen or nothing * else can take it. * * This follows the order in purchases-android "Reconcile package selection * when a window size rule hides the selected package" (#4198, not merged yet), * without its per-tab remembered pick, which web doesn't have. iOS differs: it * only picks within the hidden package's own tab, or among the packages * outside tabs (PackageValidator.swift). Either way, a package hidden in an * open sheet is replaced from that sheet first, when one there can take it. */ export declare function reconciledSelection(current: string | undefined, rendered: Iterable, placements: Map): string | undefined;