/**
 * Tool presentation layer — maps tool names to their TUI renderers.
 *
 * Provides getToolPresentation() to look up a tool's presentation by name
 * or definition.
 */
import { lookupToolPresentation } from './registry.js';
/** Resolve the ToolPresentation for a tool by name or definition. */
export function getToolPresentation(toolOrName, tool) {
    const toolDefinition = toolOrName && typeof toolOrName === 'object' ? toolOrName : tool;
    const toolName = typeof toolOrName === 'string'
        ? toolOrName
        : toolDefinition && typeof toolDefinition === 'object'
            ? toolDefinition.name
            : undefined;
    if (!toolName && !toolDefinition)
        return undefined;
    const registeredPresentation = lookupToolPresentation(toolName, toolDefinition);
    return registeredPresentation;
}
//# sourceMappingURL=index.js.map