/**
 * Advanced State Mapping - Predefined States Management
 *
 * This module handles global and local predefined states for the Tasty styling system.
 * See ADVANCED_STATE_MAPPING.md for full specification.
 */
import { Styles } from '../styles/types';
/**
 * Parsed advanced state information
 */
export interface ParsedAdvancedState {
    type: 'media' | 'container' | 'root' | 'own' | 'starting' | 'predefined' | 'modifier';
    condition: string;
    containerName?: string;
    raw: string;
    mediaType?: string;
}
/**
 * Context for state parsing operations
 */
export interface StateParserContext {
    localPredefinedStates: Record<string, string>;
    globalPredefinedStates: Record<string, string>;
    isSubElement?: boolean;
}
/**
 * At-rule context for CSS generation
 */
export interface AtRuleContext {
    media?: string[];
    container?: {
        name?: string;
        condition: string;
    }[];
    startingStyle?: boolean;
    rootStates?: string[];
    negatedRootStates?: string[];
}
/**
 * Configure global predefined states
 */
export declare function setGlobalPredefinedStates(states: Record<string, string>): void;
/**
 * Get global predefined states
 */
export declare function getGlobalPredefinedStates(): Record<string, string>;
/**
 * Clear global predefined states (for testing only)
 */
export declare function clearGlobalPredefinedStates(): void;
/**
 * Extract predefined state references from a string
 */
export declare function extractPredefinedStateRefs(value: string): string[];
/**
 * Check if a state key is a predefined state reference
 */
export declare function isPredefinedStateRef(stateKey: string): boolean;
/**
 * Extract local predefined states from a styles object
 * Local predefined states are top-level keys starting with @ that have string values
 * and are valid predefined state names (not built-in like @media, @root, etc.)
 */
export declare function extractLocalPredefinedStates(styles: Styles): Record<string, string>;
/**
 * Create a state parser context from styles
 */
export declare function createStateParserContext(styles?: Styles, isSubElement?: boolean): StateParserContext;
/**
 * Resolve a predefined state reference to its value
 * Returns the resolved value or null if not found
 */
export declare function resolvePredefinedState(stateKey: string, ctx: StateParserContext): string | null;
/**
 * Normalize state key by trimming whitespace and removing trailing/leading operators
 */
export declare function normalizeStateKey(stateKey: string): {
    key: string;
    warnings: string[];
};
/**
 * Expand dimension shorthands in a condition string
 * w -> width, h -> height, is -> inline-size, bs -> block-size
 */
export declare function expandDimensionShorthands(condition: string): string;
/**
 * Convert tasty units in a string (e.g., 40x -> calc(var(--gap) * 40))
 */
export declare function expandTastyUnits(value: string): string;
/**
 * Parse an advanced state key and return its type and components
 */
export declare function parseAdvancedState(stateKey: string, ctx: StateParserContext): ParsedAdvancedState;
/**
 * Check if a state key is an advanced state (starts with @)
 */
export declare function isAdvancedState(stateKey: string): boolean;
/**
 * Detect the type of advanced state from a raw state key
 */
export declare function detectAdvancedStateType(stateKey: string): ParsedAdvancedState['type'];
