import { InsertOption, Rendering } from "../../types";
import { ItemDescriptor } from "../pageModel";
export declare function createNewComponent(name: string, contextItem: ItemDescriptor): Promise<string | Error>;
export declare function createRendering(name: string, context: ItemDescriptor, componentTemplateId: string): Promise<{
    id: string;
} | Error>;
export declare function getAllComponents(contextItemId: string): Promise<Array<Component>>;
export declare function getFieldTypes(): Promise<Array<FieldTypeGroup>>;
export type Component = {
    templateId: string;
    name: string;
    svg: string;
    icon: string;
};
export type PlaceholderDefinition = {
    name: string;
    components: InsertOption[];
    insertOptionsNode?: ItemDescriptor;
};
export type ComponentDetails = Component & {
    compatibleRenderings: Rendering[];
    template: Template;
    placeholders: PlaceholderDefinition[];
};
export declare function loadComponentDetails(id: string, contextItemId: string): Promise<ComponentDetails>;
export declare function saveComponentDetails(component: ComponentDetails, contextItem: ItemDescriptor): Promise<boolean>;
export type Template = {
    sections: TemplateSection[];
};
export type TemplateSection = {
    id?: string;
    name: string;
    fields: TemplateField[];
    key?: string;
};
export type TemplateField = {
    id?: string;
    name: string;
    type: string;
    source: string;
    key?: string;
};
export type FieldTypeGroup = {
    name: string;
    types: string[];
};
