/// <reference types="react" />
import RGL from 'react-grid-layout';
import { ApiService } from 'src/services/apiService';
import { GlobalHandlerMap } from 'src/services/handler';
import { Registry } from 'src/services/registry';
import { StateManager } from 'src/services/stateStore';
import { Application, RuntimeApplication } from '@meta-ui/core';
export declare type RuntimeApplicationComponent = RuntimeApplication['spec']['components'][0];
export declare type MetaUIServices = {
    registry: Registry;
    stateManager: StateManager;
    globalHandlerMap: GlobalHandlerMap;
    apiService: ApiService;
};
export declare type ComponentWrapperProps = {
    parentType: string;
    component: RuntimeApplicationComponent;
};
export declare type ComponentWrapperType = React.FC<ComponentWrapperProps>;
export declare type GridCallbacks = {
    onDragStop?: (id: string, layout: RGL.Layout[]) => void;
    onDrop?: (id: string, layout: RGL.Layout[], item: RGL.Layout, event: DragEvent) => void;
};
export declare type ComponentParamsFromApp = {
    gridCallbacks?: GridCallbacks;
    componentWrapper?: ComponentWrapperType;
};
export declare type AppProps = {
    options: Application;
    services: MetaUIServices;
    debugStore?: boolean;
    debugEvent?: boolean;
} & ComponentParamsFromApp;
export declare type ImplWrapperProps = {
    component: RuntimeApplicationComponent;
    slotsMap: SlotsMap | undefined;
    targetSlot: {
        id: string;
        slot: string;
    } | null;
    services: MetaUIServices;
    app?: RuntimeApplication;
} & ComponentParamsFromApp;
export declare type SlotComponentMap = Map<string, SlotsMap>;
export declare type SlotsMap = Map<string, Array<{
    component: React.FC;
    id: string;
}>>;
export declare type CallbackMap = Record<string, () => void>;
export declare type SubscribeMethods = <U>(map: {
    [K in keyof U]: (parameters: U[K]) => void;
}) => void;
export declare type MergeState = (partialState: any) => void;
declare type RuntimeFunctions = {
    mergeState: MergeState;
    subscribeMethods: SubscribeMethods;
};
export declare type ComponentImplementationProps = ImplWrapperProps & TraitResult['props'] & RuntimeFunctions;
export declare type TraitResult = {
    props: {
        data?: unknown;
        customStyle?: Record<string, string>;
        callbackMap?: CallbackMap;
        effects?: Array<() => void>;
    } | null;
};
export declare type TraitImplementation<T = any> = (props: T & RuntimeFunctions & {
    componentId: string;
    services: MetaUIServices;
}) => TraitResult;
export declare const RuntimeModuleSchema: import("@sinclair/typebox").TObject<{
    id: import("@sinclair/typebox").TString;
    type: import("@sinclair/typebox").TString;
    properties: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
    handlers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
        type: import("@sinclair/typebox").TString;
        componentId: import("@sinclair/typebox").TString;
        method: import("@sinclair/typebox").TObject<{
            name: import("@sinclair/typebox").TString;
            parameters: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
        }>;
        wait: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
            type: import("@sinclair/typebox").TKeyOf<("debounce" | "throttle" | "delay")[]>;
            time: import("@sinclair/typebox").TNumber;
        }>>;
        disabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
    }>>;
}>;
export {};
