/**
 * SVG utility functions for creating and manipulating SVG elements.
 */
/**
 * Create an SVG element with the given tag name.
 */
export declare function createSVGElement<K extends keyof SVGElementTagNameMap>(tagName: K): SVGElementTagNameMap[K];
/**
 * Set multiple attributes on an SVG element.
 */
export declare function setAttributes(element: SVGElement, attributes: Record<string, string | number>): void;
/**
 * Create an SVG text element with content and attributes.
 */
export declare function createTextElement(content: string, attributes?: Record<string, string | number>): SVGTextElement;
/**
 * Create an SVG group element.
 */
export declare function createGroup(id?: string, classes?: string[]): SVGGElement;
/**
 * Create an SVG rect element.
 */
export declare function createRect(x: number, y: number, width: number, height: number, attributes?: Record<string, string | number>): SVGRectElement;
/**
 * Create an SVG line element.
 */
export declare function createLine(x1: number, y1: number, x2: number, y2: number, attributes?: Record<string, string | number>): SVGLineElement;
/**
 * Apply text styling attributes based on settings.
 */
export declare function applyTextStyle(element: SVGTextElement, style: {
    fontFamily?: string;
    fontSize?: number;
    foreColor?: string;
    backColor?: string;
    italic?: boolean;
    bold?: boolean;
    underline?: number;
    overline?: number;
    strike?: number;
    rotate?: number;
}): void;
/**
 * Apply line decoration to text (for custom thickness support).
 * This creates actual line elements for better control over thickness.
 */
export declare function applyLineDecoration(parentGroup: SVGGElement, textElement: SVGTextElement, type: "underline" | "overline" | "strike", thickness: number, color: string, style?: string): SVGLineElement;
/**
 * Parse SVG from string and return the root element.
 * Assumes the SVG content has a root <g> element.
 */
export declare function parseSVGContent(svgString: string): SVGGElement | null;
/**
 * Clone an SVG element and all its children.
 */
export declare function cloneSVGElement<T extends SVGElement>(element: T): T;
/**
 * Get the bounding box of an SVG element in a safe way.
 * Returns a default rectangle if getBBox() fails.
 *
 * IMPORTANT: This returns the bbox in LOCAL coordinates (without transforms).
 * Use getTransformedBBox() if you need the actual screen/SVG coordinates.
 */
export declare function getSafeBBox(element: SVGElement): DOMRect;
/**
 * Get the bounding box of an SVG element WITH transforms applied.
 * This returns the actual position in the SVG coordinate system.
 *
 * This is crucial for visibility checks because getBBox() returns local coords
 * which don't reflect the element's actual position after transforms.
 *
 * @param element - The SVG element
 * @returns The bounding box in SVG coordinate space (with transforms applied)
 */
export declare function getTransformedBBox(element: SVGElement): DOMRect;
/**
 * Apply a transform to an SVG element.
 */
export declare function applyTransform(element: SVGElement, transform: {
    translateX?: number;
    translateY?: number;
    scaleX?: number;
    scaleY?: number;
    rotate?: number;
    originX?: number;
    originY?: number;
}): void;
/**
 * Calculate the center point of a bounding rectangle.
 */
export declare function getRectCenter(rect: DOMRect | {
    x: number;
    y: number;
    width: number;
    height: number;
}): {
    x: number;
    y: number;
};
/**
 * Get computed text width for a given text and style.
 * Creates a temporary SVG element to measure.
 *
 * IMPORTANT: The measurementRoot parameter is critical for correct measurements
 * when the component runs inside Angular or other frameworks that apply global
 * CSS styles (like font-family) to document.body. Without it, measurements
 * happen in document.body where inherited styles may affect font metrics,
 * but actual rendering happens inside Shadow DOM where styles are isolated.
 * This mismatch causes text positions and hint placements to be incorrect.
 *
 * When measurementRoot is provided (typically the component's root SVG element),
 * measurements happen in the same CSS context as the actual rendering,
 * ensuring consistent font metrics.
 *
 * @param text - The text to measure
 * @param fontFamily - Font family to use
 * @param fontSize - Font size in pixels
 * @param bold - Whether text is bold
 * @param italic - Whether text is italic
 * @param measurementRoot - Optional SVG element to use as measurement context.
 *                          If provided, a temporary text element is appended here
 *                          for measurement (same CSS context as rendering).
 *                          If not provided, falls back to document.body (legacy behavior).
 */
export declare function getTextWidth(text: string, fontFamily: string, fontSize: number, bold?: boolean, italic?: boolean, measurementRoot?: SVGElement): number;
/**
 * Move an element to the back (lowest z-index in SVG).
 */
export declare function moveToBack(element: SVGElement): void;
/**
 * Move an element to the front (highest z-index in SVG).
 */
export declare function moveToFront(element: SVGElement): void;
