/**
 * Exclusive Condition Builder
 *
 * Transforms parsed style entries into exclusive conditions.
 * Each entry's condition is ANDed with the negation of all higher-priority conditions,
 * ensuring exactly one condition matches at any given time.
 */
import { StyleValue } from '../utils/styles';
import { ConditionNode } from './conditions';
/**
 * Parsed style entry with condition
 */
export interface ParsedStyleEntry {
    styleKey: string;
    stateKey: string;
    value: StyleValue;
    condition: ConditionNode;
    priority: number;
}
/**
 * Style entry with exclusive condition
 */
export interface ExclusiveStyleEntry extends ParsedStyleEntry {
    exclusiveCondition: ConditionNode;
}
/**
 * Build exclusive conditions for a list of parsed style entries.
 *
 * The entries should be ordered by priority (highest priority first).
 *
 * For each entry, we compute:
 *   exclusiveCondition = condition & !prior[0] & !prior[1] & ...
 *
 * This ensures exactly one condition matches at any time.
 *
 * Example:
 *   Input (ordered highest to lowest priority):
 *     A: value1 (priority 2)
 *     B: value2 (priority 1)
 *     C: value3 (priority 0)
 *
 *   Output:
 *     A: A
 *     B: B & !A
 *     C: C & !A & !B
 *
 * @param entries Parsed style entries ordered by priority (highest first)
 * @returns Entries with exclusive conditions, filtered to remove impossible ones
 */
export declare function buildExclusiveConditions(entries: ParsedStyleEntry[]): ExclusiveStyleEntry[];
/**
 * Parse style entries from a value mapping object.
 *
 * @param styleKey The style key (e.g., 'padding')
 * @param valueMap The value mapping { '': '2x', 'compact': '1x', '@media(w < 768px)': '0.5x' }
 * @param parseCondition Function to parse state keys into conditions
 * @returns Parsed entries ordered by priority (highest first)
 */
export declare function parseStyleEntries(styleKey: string, valueMap: Record<string, StyleValue>, parseCondition: (stateKey: string) => ConditionNode): ParsedStyleEntry[];
/**
 * Check if a value is a style value mapping (object with state keys)
 */
export declare function isValueMapping(value: StyleValue | Record<string, StyleValue>): value is Record<string, StyleValue>;
/**
 * Expand OR conditions in parsed entries into multiple exclusive entries.
 *
 * For an entry with condition `A | B | C`, this creates 3 entries:
 *   - condition: A
 *   - condition: B & !A
 *   - condition: C & !A & !B
 *
 * This ensures OR branches are mutually exclusive BEFORE the main
 * exclusive condition building pass.
 *
 * @param entries Parsed entries (may contain OR conditions)
 * @returns Expanded entries with OR branches made exclusive
 */
export declare function expandOrConditions(entries: ParsedStyleEntry[]): ParsedStyleEntry[];
/**
 * Expand OR conditions in exclusive entries AFTER buildExclusiveConditions.
 *
 * This handles ORs that arise from De Morgan expansion during negation:
 *   !(A & B) = !A | !B
 *
 * These ORs need to be made exclusive to avoid overlapping CSS rules:
 *   !A | !B  →  !A | (A & !B)
 *
 * This is logically equivalent but ensures each branch has proper context.
 *
 * Example:
 *   Input: { "": V1, "@supports(...) & :has()": V2 }
 *   V2's exclusive = @supports & :has
 *   V1's exclusive = !(@supports & :has) = !@supports | !:has
 *
 *   Without this fix: V1 gets two rules:
 *     - @supports (not ...) → V1  ✓
 *     - :not(:has()) → V1  ✗ (missing @supports context!)
 *
 *   With this fix: V1 gets two exclusive rules:
 *     - @supports (not ...) → V1  ✓
 *     - @supports (...) { :not(:has()) } → V1  ✓ (proper context!)
 */
export declare function expandExclusiveOrs(entries: ExclusiveStyleEntry[]): ExclusiveStyleEntry[];
