import type { BlockSchema, ComponentMetaSchemaForRenderer, PackageSchema } from '@mo-fang/types';
import { Component, ComponentProps, ComponentType, RefObject } from 'react';
import type { RendererInterface } from '../types';
interface BuilderJSONProps extends ComponentProps<'div'> {
    uuid: string;
    json: {
        schema: BlockSchema;
        assets: ComponentMetaSchemaForRenderer[];
        packages?: PackageSchema[];
    };
}
interface BuilderIdProps extends ComponentProps<'div'> {
    servicePrefix?: string;
    uuid: string;
}
export type BuilderComponentProps = (BuilderJSONProps | BuilderIdProps) & {
    components?: Record<string, ComponentType<any>>;
    injectProps?: Record<string, unknown>;
};
export declare class BuilderComponent extends Component<BuilderComponentProps> {
    renderer: RendererInterface;
    ref: RefObject<HTMLDivElement>;
    constructor(props: BuilderComponentProps);
    /**
     * 从服务获取 schema
     */
    fetchJSONSchema: ({ servicePrefix, uuid, }: Pick<BuilderIdProps, 'servicePrefix' | 'uuid'>) => Promise<BuilderJSONProps['json'] | undefined>;
    /**
     * 触发渲染
     */
    triggerRender: () => Promise<void>;
    componentDidMount(): void;
    componentDidUpdate(prevProps: Readonly<BuilderComponentProps>): void;
    componentWillUnmount(): void;
    render(): JSX.Element;
}
export {};
//# sourceMappingURL=builder-component.d.ts.map