/**
 * Style injector that works with structured style objects
 * Eliminates CSS string parsing for better performance
 */
import { StyleResult } from '../utils/renderStyles';
import { GlobalInjectResult, InjectResult, KeyframesResult, KeyframesSteps, StyleInjectorConfig } from './types';
import type { ComponentType } from 'react';
export declare class StyleInjector {
    private sheetManager;
    private config;
    private cleanupScheduled;
    private globalRuleCounter;
    constructor(config?: StyleInjectorConfig);
    /**
     * Allocate a className for a cacheKey without injecting styles yet.
     * This allows separating className allocation (render phase) from style injection (insertion phase).
     */
    allocateClassName(cacheKey: string, options?: {
        root?: Document | ShadowRoot;
    }): {
        className: string;
        isNewAllocation: boolean;
    };
    /**
     * Inject styles from StyleResult objects
     */
    inject(rules: StyleResult[], options?: {
        root?: Document | ShadowRoot;
        cacheKey?: string;
    }): InjectResult;
    /**
     * Inject global styles (rules without a generated tasty class selector)
     * This ensures we don't reserve a tasty class name (t{number}) for global rules,
     * which could otherwise collide with element-level styles and break lookups.
     */
    injectGlobal(rules: StyleResult[], options?: {
        root?: Document | ShadowRoot;
    }): GlobalInjectResult;
    /**
     * Inject styles from createGlobalStyle (separate from injectGlobal for tracking)
     */
    injectCreateGlobalStyle(rules: StyleResult[], options?: {
        root?: Document | ShadowRoot;
    }): GlobalInjectResult;
    /**
     * Dispose of a className
     */
    private dispose;
    /**
     * Force bulk cleanup of unused styles
     */
    cleanup(root?: Document | ShadowRoot): void;
    /**
     * Get CSS text from all sheets (for SSR)
     */
    getCssText(options?: {
        root?: Document | ShadowRoot;
    }): string;
    /**
     * Get CSS only for the provided tasty classNames (e.g., ["t0","t3"])
     */
    getCssTextForClasses(classNames: Iterable<string>, options?: {
        root?: Document | ShadowRoot;
    }): string;
    /**
     * Get cache performance metrics
     */
    getMetrics(options?: {
        root?: Document | ShadowRoot;
    }): any;
    /**
     * Reset cache performance metrics
     */
    resetMetrics(options?: {
        root?: Document | ShadowRoot;
    }): void;
    /**
     * Define a CSS @property custom property
     * Example:
     * @property --rotation { syntax: "<angle>"; inherits: false; initial-value: 45deg; }
     * Note: No caching or dispose — this defines a global property.
     */
    property(name: string, options?: {
        syntax?: string;
        inherits?: boolean;
        initialValue?: string | number;
        root?: Document | ShadowRoot;
    }): void;
    /**
     * Check whether a given @property name was already injected by this injector
     */
    isPropertyDefined(name: string, options?: {
        root?: Document | ShadowRoot;
    }): boolean;
    /**
     * Inject keyframes and return object with toString() and dispose()
     */
    keyframes(steps: KeyframesSteps, nameOrOptions?: string | {
        root?: Document | ShadowRoot;
        name?: string;
    }): KeyframesResult;
    /**
     * Dispose keyframes
     */
    private disposeKeyframes;
    /**
     * Destroy all resources for a root
     */
    destroy(root?: Document | ShadowRoot): void;
    /**
     * Create a global style component like styled-components createGlobalStyle
     * Returns a React component that injects global styles when mounted and cleans up when unmounted
     */
    createGlobalStyle<Props = {}>(strings: TemplateStringsArray, ...interpolations: Array<string | number | ((props: Props) => string | number)>): ComponentType<Props & {
        root?: Document | ShadowRoot;
    }>;
}
