import { ReactElement } from 'react'; import { ElementNode } from '../types'; import { RendererAdapter } from './types'; /** * Base adapter class that provides common rendering functionality. * Child classes only need to implement the normalizeElementType method * to define their component name mappings. */ export declare abstract class BaseAdapter implements RendererAdapter { /** * Renders a React component to an ElementNode tree structure. * Uses react-test-renderer to create a test instance and converts * it to our internal ElementNode format. * * @param component - The React component to render * @returns The rendered element tree, or null if rendering fails */ renderToTree(component: ReactElement): ElementNode | null; /** * Normalizes a component type name to a standard element type. * Must be implemented by child classes to define their specific mappings. * * @param type - The component type name * @returns The normalized standard element type */ abstract normalizeElementType(type: string): string; /** * Converts a ReactTestRenderer node to our ElementNode structure. * This is the internal implementation that handles the tree conversion. * * @param node - The ReactTestRenderer node * @returns The converted ElementNode, or null if conversion fails */ protected convertToElementNode(node: any): ElementNode | null; } //# sourceMappingURL=base-adapter.d.ts.map