/**
 * CSS Materialization
 *
 * Converts condition trees into CSS selectors and at-rules.
 * This is the final stage that produces actual CSS output.
 */
import { ConditionNode } from './conditions';
/**
 * Parsed media condition for structured analysis and combination
 */
export interface ParsedMediaCondition {
    /** Subtype for structured analysis */
    subtype: 'dimension' | 'feature' | 'type';
    /** Whether this is a negated condition */
    negated: boolean;
    /** The condition part for CSS output (e.g., "(width < 600px)", "print") */
    condition: string;
    /** For dimension queries: dimension name */
    dimension?: 'width' | 'height' | 'inline-size' | 'block-size';
    /** For dimension queries: lower bound value */
    lowerBound?: {
        value: string;
        valueNumeric: number | null;
        inclusive: boolean;
    };
    /** For dimension queries: upper bound value */
    upperBound?: {
        value: string;
        valueNumeric: number | null;
        inclusive: boolean;
    };
    /** For feature queries: feature name */
    feature?: string;
    /** For feature queries: feature value */
    featureValue?: string;
    /** For type queries: media type */
    mediaType?: 'print' | 'screen' | 'all' | 'speech';
}
/**
 * Parsed container condition for structured analysis and combination
 */
export interface ParsedContainerCondition {
    /** Container name (undefined = unnamed/nearest container) */
    name?: string;
    /** The condition part (e.g., "(width < 600px)" or "style(--variant: danger)") */
    condition: string;
    /** Whether this is a negated condition */
    negated: boolean;
    /** Subtype for structured analysis */
    subtype: 'dimension' | 'style';
    /** For style queries: property name (without --) */
    property?: string;
    /** For style queries: property value (undefined = existence check) */
    propertyValue?: string;
}
/**
 * A single selector variant (one term in a DNF expression)
 */
export interface SelectorVariant {
    /** Attribute/pseudo selectors to add to element selector (e.g., '[data-hovered]', ':not([data-disabled])') */
    modifierSelectors: string[];
    /** Selector suffixes for @own states (applied to sub-element) */
    ownSelectors: string[];
    /** Parsed media conditions for structured combination */
    mediaConditions: ParsedMediaCondition[];
    /** Parsed container conditions for structured combination */
    containerConditions: ParsedContainerCondition[];
    /** Root state prefix (e.g., ':root[data-theme="dark"]') */
    rootPrefix?: string;
    /** Whether to wrap in @starting-style */
    startingStyle: boolean;
}
/**
 * CSS output components extracted from a condition
 * Supports multiple variants for OR conditions (DNF form)
 */
export interface CSSComponents {
    /** Selector variants - OR means multiple variants, AND means single variant with combined selectors */
    variants: SelectorVariant[];
    /** Whether condition is impossible (should skip) */
    isImpossible: boolean;
}
/**
 * Final CSS rule output
 */
export interface CSSRule {
    /** Single selector or array of selector fragments (for OR conditions) */
    selector: string | string[];
    declarations: string;
    atRules?: string[];
    rootPrefix?: string;
}
/**
 * Convert a condition tree to CSS components
 */
export declare function conditionToCSS(node: ConditionNode): CSSComponents;
/**
 * Clear the condition cache (for testing)
 */
export declare function clearConditionCache(): void;
/**
 * Build a complete CSS selector from a single variant
 */
export declare function buildCSSSelectorFromVariant(className: string, variant: SelectorVariant, selectorSuffix?: string): string;
/**
 * Build at-rules array from a variant
 */
export declare function buildAtRulesFromVariant(variant: SelectorVariant): string[];
/**
 * Materialize a computed rule into final CSS format
 *
 * Returns an array of CSSRules because OR conditions may require multiple rules
 * (when different branches have different at-rules)
 */
export declare function materializeRule(condition: ConditionNode, declarations: Record<string, string>, selectorSuffix: string, className: string): CSSRule[];
