import { Feature, OperationFeature } from "../models";
import { GveRenditionSettings } from "../settings/settings";
import { Logger } from "../core/logger";
/**
 * Hint property overrides from r_h-* features.
 */
export interface HintOverrides {
    position?: string;
    offsetX?: string;
    offsetY?: string;
    scaleX?: string;
    scaleY?: string;
    rotation?: string;
    solid?: boolean;
    displacedSpan?: {
        nodeId: number;
        count: number;
    };
}
/**
 * Resolved rendition configuration for text rendering.
 */
export interface RenditionConfig {
    fontSize: number;
    fontFamily: string;
    foreColor: string;
    backColor: string;
    italic: boolean;
    bold: boolean;
    underline?: number;
    overline?: number;
    strike?: number;
    textLineStyle?: string;
    textLineColor?: string;
    rotate?: number;
    textPosition?: string;
    textOffsetX: number | string;
    textOffsetY: number | string;
    textSolid?: boolean;
    textDisplacedSpan?: {
        nodeId: number;
        count: number;
    };
    textValue?: string;
    hints?: string[];
    hintOverrides?: Map<string, HintOverrides>;
    hintVars?: Map<string, string>;
}
/**
 * Feature resolver converts features into rendition configuration.
 * This handles all the r_* rendition features and applies them to create
 * a complete configuration for rendering.
 */
export declare class FeatureResolver {
    private _logger;
    constructor(logger: Logger);
    /**
     * Resolve rendition features into a complete configuration.
     * Features override the base settings.
     *
     * @param baseSettings - The base settings from component
     * @param features - Array of features to apply
     * @param nodeFeatureContext - Optional context for extracting node features for placeholder resolution
     * @returns Resolved rendition configuration
     */
    resolve(baseSettings: GveRenditionSettings, features: Feature[] | undefined, nodeFeatureContext?: {
        nodeFeatures: Record<string, OperationFeature[]>;
        outputTag: string;
        refNodeIds: number[];
    }): RenditionConfig;
    /**
     * Extract character offsets from init features.
     * This is used for base text layout adjustments.
     *
     * @param features - Features from the first annotate operation (init features)
     * @returns Map of node IDs to their offsets (values may be numbers or "Ntw"/"Nth" strings)
     */
    extractCharOffsets(features: Feature[] | undefined): Map<number, {
        x?: number | string;
        y?: number | string;
    }>;
    /**
     * Check if features contain a specific rendition feature.
     */
    hasRenditionFeature(features: Feature[] | undefined, featureName: string): boolean;
    /**
     * Get the value of a rendition feature.
     */
    getRenditionFeatureValue(features: Feature[] | undefined, featureName: string): string | undefined;
    /**
     * Parse r_h-* hint override features.
     * Format: "value" applies to all hints, or "@hintId1 hintId2:value" applies to specific hints.
     *
     * @param featureName - The feature name (e.g., "r_h-position")
     * @param value - The feature value
     * @param config - The rendition config to update
     */
    private parseHintOverride;
}
