
import { AtomicState } from "../types/StateAxis.js";

//#region ../automated-config/dist/utils/pseudoStateSelectors.d.ts
//#region src/utils/pseudoStateSelectors.d.ts
/**
 * Legacy atom names accepted by the CSS generator + docs-mode map for
 * unmigrated configs. They aren't composable through `StateAxis`, so the new
 * resolver/StateBuilder never emit them.
 */
type LegacyStateAtom = 'disabled' | 'focused' | 'focused-keyboard' | 'selected';
type KnownStateAtom = AtomicState | LegacyStateAtom;
declare function isKnownStateAtom(atom: string): atom is KnownStateAtom;
/**
 * Each atom selector contributes exactly (0,1,0) to specificity. The base
 * component class adds another (0,1,0), so a full rule's specificity is
 * `(0, 1 + atom-count, 0)`:
 *
 *   rest        → (0,1,0)  e.g. `.uds-input-...root`
 *   1-atom      → (0,2,0)  e.g. `.uds-input-...root:hover...`
 *   2-atom      → (0,3,0)  e.g. `.uds-input-...root:has(...):hover...`
 *   3-atom      → (0,4,0)
 *   4-atom      → (0,5,0)
 *
 * Cross-rank cascade (compound beats atom beats rest) is therefore encoded
 * in CSS class-count specificity, not source order — making the cascade-
 * cancellation feature robust to any tool that reorders rules within a
 * stylesheet. Within a rank (e.g. `:hover` vs `:focus-visible`, both
 * (0,2,0)) source order still arbitrates; the resolver computes intra-rank
 * order inline from `STATE_PRIORITY`. See {@link resolvePropertyStates}.
 *
 * Why each entry is (0,1,0):
 *
 * - `:hover` / `:active` / `:focus*` / `:visited` are single pseudo-classes,
 *   each (0,1,0).
 * - `:hover` and `:active` carry a `:where(:not(...))` blocker so the rule
 *   doesn't match when the element is also active/disabled. The outer
 *   `:where()` zeros the `:not(...)` contribution, leaving the bare pseudo-
 *   class's (0,1,0) as the only contributor.
 * - `:is(:disabled, :has(:disabled))` takes the max specificity of its
 *   args; both are (0,1,0), so the whole is (0,1,0).
 * - `:has(...)` selectors take the specificity of their arg's most specific
 *   complex selector. Arguments are pseudo-classes or attribute selectors at
 *   (0,1,0); where a form-control scope is also needed (e.g. `readonly` —
 *   non-form-control elements default to `:read-only` per spec, so a bare
 *   `:has(:read-only)` matches any container with DIV/SPAN children), the
 *   scope goes inside `:where(...)` so its (0,0,1) type-selector contribution
 *   is zeroed.
 *
 * **Consumer override ergonomics:** a plain `.my-input:hover` is (0,2,0),
 * which ties library 1-atom rules at (0,2,0); source order decides. To
 * unconditionally beat the library, consumers need (0,3,0) (e.g.
 * `.scope .my-input:hover` or `.my-input.my-input:hover`).
 */
/**
 * Returns the CSS pseudo-selector string for a state key.
 *
 * - `'rest'`, `''`, and fully-unknown keys return `''`. An unknown atom inside
 *   an otherwise-known compound is skipped (the known atoms still contribute) —
 *   but callers only pass canonical validated keys, so that case doesn't arise
 *   in practice.
 * - Atomic keys return their entry from {@link ATOMIC_SELECTORS}.
 * - Compound keys (`'a&b'`) return the concatenation of each atomic selector
 *   in the order they appear in the key.
 */
declare function getStateSelector(stateKey: string): string;
/**
 * Returns the docs-mode class name for a state key, used to force-trigger
 * pseudo-states in docs/Storybook previews.
 *
 * - `'rest'`, `''`, and fully-unknown keys return `''`. An unknown atom inside
 *   an otherwise-known compound is skipped (the known atoms still contribute) —
 *   but callers only pass canonical validated keys, so that case doesn't arise
 *   in practice.
 * - Atomic keys return their entry from {@link ATOMIC_DOCS_CLASSES}.
 * - Compound keys join atomic docs classes with `'-and-'`.
 */
declare function getStateDocsClass(stateKey: string): string; //#endregion
//#endregion
export { getStateDocsClass, getStateSelector, isKnownStateAtom };