import { TabId } from './preview.js';
export { BomTable, CircuitJsonPreview, PcbViewerWithContainerHeight, PreviewContentProps, linkify, useOrderDialog, useOrderDialogCli } from './preview.js';
export { CadViewer } from '@tscircuit/3d-viewer';
export { PCBViewer as PcbViewer } from '@tscircuit/pcb-viewer';
export { SchematicViewer } from '@tscircuit/schematic-viewer';
import * as react_jsx_runtime from 'react/jsx-runtime';
import { ManualEditEvent } from '@tscircuit/props';
import 'circuit-json';
import 'three';
import 'react';

interface RunFrameProps {
    /**
     * Map of filenames to file contents that will be available in the worker
     */
    fsMap: Map<string, string> | Record<string, string>;
    /**
     * The entry point file that will be executed first. If not provided,
     * @tscircuit/eval will infer the entrypoint
     */
    entrypoint?: string;
    /**
     * The path to the main component that should be rendered. If not provided,
     * the default component from the entry point will be used.
     */
    mainComponentPath?: string;
    /**
     * Whether to show a run button that controls when code executes
     */
    showRunButton?: boolean;
    /**
     * Whether to show a full screen button
     */
    showToggleFullScreen?: boolean;
    /**
     * Whether to expand the preview to fill the available space by default
     */
    defaultToFullScreen?: boolean;
    /**
     * An optional left-side header, you can put a save button, a run button, or
     * a title here.
     */
    leftHeaderContent?: React.ReactNode;
    /**
     * Called when the circuit JSON changes
     */
    onCircuitJsonChange?: (circuitJson: any) => void;
    /**
     * Called when rendering is finished
     */
    onRenderFinished?: (params: {
        circuitJson: any;
    }) => void;
    /**
     * Called when the initial render is finished (fast)
     */
    onInitialRender?: (params: {
        circuitJson: any;
    }) => void;
    /**
     * Called when rendering is started
     */
    onRenderStarted?: () => void;
    /**
     * Called for each render event
     */
    onRenderEvent?: (event: any) => void;
    /**
     * Called when an error occurs
     */
    onError?: (error: Error) => void;
    /**
     * Called when an edit event occurs
     */
    onEditEvent?: (editEvent: ManualEditEvent) => void;
    /**
     * Any edit events that have occurred and should be applied
     */
    editEvents?: ManualEditEvent[];
    /**
     * If true, turns on debug logging
     */
    debug?: boolean;
    defaultActiveTab?: TabId;
    evalWebWorkerBlobUrl?: string;
    evalVersion?: string;
    forceLatestEvalVersion?: boolean;
    /**
     * Optional project URL whose pathname will be used when
     * reporting autorouting bugs
     */
    projectUrl?: string;
    onReportAutoroutingLog?: (name: string, data: {
        simpleRouteJson: any;
    }) => void;
}

declare global {
    var runFrameWorker: any;
}

declare const RunFrame: (props: RunFrameProps) => react_jsx_runtime.JSX.Element;

declare const guessEntrypoint: (files: string[]) => string | undefined;
declare const guessManualEditsFilePath: (files: string[]) => string | undefined;
interface RunFrameWithApiProps {
    /**
     * Base URL for the API endpoints
     */
    apiBaseUrl?: string;
    evalVersion?: string;
    forceLatestEvalVersion?: boolean;
    debug?: boolean;
    leftHeaderContent?: React.ReactNode;
    defaultToFullScreen?: boolean;
    showToggleFullScreen?: boolean;
}
declare const RunFrameWithApi: (props: RunFrameWithApiProps) => react_jsx_runtime.JSX.Element;

declare const RunFrameForCli: (props: {
    debug?: boolean;
    scenarioSelectorContent?: React.ReactNode;
}) => react_jsx_runtime.JSX.Element;

interface ComponentSearchResult {
    id: string;
    name: string;
    description?: string;
    source: "tscircuit.com" | "jlcpcb";
    partNumber?: string;
    package?: string;
    price?: number;
    code?: string;
    owner?: string;
}
interface ImportComponentDialogProps {
    isOpen: boolean;
    onClose: () => void;
    onImport: (component: ComponentSearchResult) => void;
}
declare const ImportComponentDialog: ({ isOpen, onClose, onImport, }: ImportComponentDialogProps) => react_jsx_runtime.JSX.Element;

/**
 * JLC API service for fetching component data from the JLC search API
 */
interface JLCComponent {
    description: string;
    lcsc: number;
    mfr: string;
    package: string;
    price: number;
}
/**
 * Search for components in the JLC database
 * @param query Search query string
 * @param limit Maximum number of results to return (default: 10)
 * @returns Promise with search results
 */
declare const searchJLCComponents: (query: string, limit?: number) => Promise<JLCComponent[]>;
/**
 * Map JLC component data to the ComponentSearchResult format used in the ImportComponentDialog
 * @param jlcComponent JLC component data
 * @returns Formatted component data for the UI
 */
declare const mapJLCComponentToSearchResult: (jlcComponent: JLCComponent) => {
    id: string;
    name: string;
    description: string;
    source: "jlcpcb";
    partNumber: string;
    package: string;
    price: number;
};

/**
 * tscircuit Registry API service for fetching component data from the tscircuit registry API
 */
interface TscircuitSnippet {
    snippet_id: string;
    package_release_id: string;
    unscoped_name: string;
    name: string;
    owner_name: string;
    code: string;
    description?: string;
    preview_url?: string;
}
/**
 * Search for components in the tscircuit registry
 * @param query Search query string
 * @param limit Maximum number of results to return (default: 10)
 * @returns Promise with search results
 */
declare const searchTscircuitComponents: (query: string, limit?: number) => Promise<TscircuitSnippet[]>;
/**
 * Map tscircuit component data to the ComponentSearchResult format used in the ImportComponentDialog
 * @param tscircuitSnippet tscircuit component data
 * @returns Formatted component data for the UI
 */
declare const mapTscircuitSnippetToSearchResult: (tscircuitSnippet: TscircuitSnippet) => {
    id: string;
    name: string;
    description: string;
    source: "tscircuit.com";
    partNumber: string;
    previewUrl: string | undefined;
    code: string;
    owner: string;
};

export { type ComponentSearchResult, ImportComponentDialog, RunFrame, RunFrameForCli, type RunFrameProps, RunFrameWithApi, type RunFrameWithApiProps, TabId, guessEntrypoint, guessManualEditsFilePath, mapJLCComponentToSearchResult, mapTscircuitSnippetToSearchResult, searchJLCComponents, searchTscircuitComponents };
