import { RuntimeTrait, RuntimeTraitSchema } from '@sunmao-ui/core';
import { UIServices } from './application';
import { RuntimeFunctions } from './component';
export declare type TraitResult<KStyleSlot extends string, KEvent extends string> = {
    props: {
        data?: unknown;
        customStyle?: Record<KStyleSlot, string>;
        callbackMap?: CallbackMap<KEvent>;
        componentDidUnmount?: Array<() => void>;
        componentDidMount?: Array<() => Function | void>;
        componentDidUpdate?: Array<() => Function | void>;
    } | null;
    unmount?: boolean;
};
export declare type TraitImpl<T = any> = (props: T & RuntimeFunctions<unknown, unknown, any> & {
    trait: RuntimeTraitSchema;
    componentId: string;
    services: UIServices;
}) => TraitResult<string, string>;
export declare type TraitImplFactory<T = any> = () => TraitImpl<T>;
export declare type ImplementedRuntimeTraitFactory = RuntimeTrait & {
    factory: TraitImplFactory;
};
export declare type ImplementedRuntimeTrait = ImplementedRuntimeTraitFactory & {
    impl: TraitImpl;
};
export declare type CallbackMap<K extends string> = Record<K, () => void>;
