import { SerializedNodes } from '@ws-ui/craftjs-core';
import { WebformState } from './webform-state';
export type IWebFormMetadata = Partial<{
    v: string;
    datasources: datasources.ICreateDataSource[];
    states: WebformState[];
    defaultStates: string[];
    styles: IWebFormStyleClass[];
    title: string;
}>;
interface IPage {
    name: string;
    id: string;
    components: SerializedNodes;
}
export interface IWebFormContent {
    components?: SerializedNodes;
    metadata?: IWebFormMetadata;
    pages?: IPage[];
}
export declare enum EWebFormStyleClassScope {
    LOCAL = "local",
    SHARED = "shared",
    THEME = "theme"
}
export interface IWebFormStyleClass {
    /**
     * Unique id for the class.
     */
    id: string;
    /**
     * Scope of the classe.
     * values: 'shared', 'theme', 'local'
     */
    scope: EWebFormStyleClassScope;
    /**
     * Name of the class
     */
    name: string;
    /**
     * content of the class.
     */
    content: string;
    /**
     * an id of the parent class. should be null if the class is not associated with any other class.
     */
    parentId: string | null;
    /**
     * An object of linked style classes.
     *
     * onDrop of the class on a component, if the component has a linked node,
     * it will be assigned a style class if it's type is declared in this object.
     *
     * key: represents the type of component to be associated with style class on drop.
     *
     * value: id of the associated style class.
     */
    children?: {
        [key: string]: string;
    };
    /**
     * defines the origin of the style class from which it was exported.
     */
    origin?: string;
}
export interface IComponentTemplate {
    rootNodeId: string;
    id: string;
    name?: string;
    nodes: SerializedNodes;
    icon?: string;
    styles?: IWebFormStyleClass[];
}
export interface IControlledFieldProps<T> {
    ref: any;
    label: string;
    isSmall: boolean;
    value: T;
    defaultValue: T;
    onChange: (value: T, error?: string) => any;
}
export {};
