import 'moment/locale/en-gb';
import { JSON as HestiaJson, SchemaType, NodeType } from '@hestia-earth/schema';
import { definitions, definition } from '@hestia-earth/json-schema';
import { IValidationError, validationErrorLevel } from './files-error.model';
export declare const ARRAY_DELIMITER = ";";
export declare type suggestionType = NodeType | 'select' | 'default';
export declare const defaultSuggestionType: suggestionType;
interface INodePropertySuggestion {
    type?: suggestionType;
    queries?: any[];
    values?: string[];
    parentLevel?: number;
    isLinkNode?: boolean;
    isUniqueKey?: string;
}
interface INewProperty {
    name?: string;
    prop?: definition;
}
export interface IErrorProperty {
    level?: validationErrorLevel;
    message?: string;
}
export interface INodeProperty {
    /**
     * Whether or not this property was added by the user
     */
    id: string;
    isAdded?: boolean;
    schemaType: SchemaType;
    key: string;
    fullKey: string;
    value: any;
    addPropertyEnabled: boolean;
    suggestions?: INodePropertySuggestion;
    schema?: definition;
    error?: IValidationError;
    hasError?: boolean;
    hasWarning?: boolean;
    editable?: boolean;
    closedVisible?: boolean;
    newProperty?: INewProperty;
    newError?: IErrorProperty;
    isRequired?: boolean;
    isHidden?: boolean;
    isArray?: boolean;
    isExpandable?: boolean;
    isOpen?: boolean;
    properties: INodeProperty[];
    placeholder?: string;
    externalUrl?: {
        url?: string;
        title: string;
        icon?: string;
        urlParamValue?: boolean;
    };
    loading?: boolean;
    changed?: boolean;
}
export declare const keyToDataPath: (key: string) => string;
export declare const dataPathToKey: (dataPath?: string, trimArray?: boolean) => string;
export declare const parentKey: (key: string) => string;
/**
 * Sort properties having errors, type, id, ...properties (simple), and finally the groups
 *
 * @param a {INodeProperty}
 * @param b {INodeProperty}
 */
export declare const sortProperties: (a: INodeProperty, b: INodeProperty) => number;
export declare const formatPropertyError: (errors: any, property: INodeProperty) => string;
export declare const hasError: (value: any) => any;
export declare const hasWarning: (value: any) => any;
export declare const nodeAvailableProperties: (node: HestiaJson<SchemaType>, { fullKey, schema, schemaType }: Partial<INodeProperty>) => any;
export declare const isAddPropertyEnabled: (node: HestiaJson<SchemaType>, schemaType: SchemaType, schema: definition, fullKey?: string) => boolean;
export declare const propertyId: () => any;
/**
 * Convert value to the final type in the schema.
 *
 * @param schema Definition of the value.
 * @param value
 * @returns Value in the correct format.
 */
export declare const parseNewValue: (schema: definition, value: any) => any;
export declare const propertyError: (errors: IValidationError[]) => (dataPath: string, nonExpandableArray?: boolean) => IValidationError;
export declare const singleProperty: (schemas: definitions, errors: IValidationError[], node: any, fullKey: string) => INodeProperty;
export declare const recursiveProperties: (schemas: definitions, errors: IValidationError[], nodeSchema: definition, deepEditable: boolean, parent?: string) => (node: any) => INodeProperty[];
export declare const updateProperties: ({ properties }: Partial<INodeProperty>, updater: (prop: INodeProperty) => INodeProperty) => any;
export declare const typeToNewProperty: (schemas: definitions, schema: definition, nodeSchema: definition, node: any, fullKey: string) => INodeProperty;
export declare const findProperty: (properties: INodeProperty[], fullKey: string) => any;
export declare const parentProperty: (properties: INodeProperty[], property: INodeProperty) => INodeProperty;
export declare const nestedProperty: ({ properties }: INodeProperty, nestedKey: string) => INodeProperty;
export declare const siblingProperty: (properties: INodeProperty[], property: INodeProperty, siblingKey: string) => INodeProperty;
export declare const groupChanged: (properties: INodeProperty[], key: string, value?: any) => void;
export declare const refreshPropertyKeys: (property: INodeProperty) => any;
export declare const calculateCycleDurationEnabled: (properties: INodeProperty[], property: INodeProperty) => boolean;
export declare const calculateCycleDuration: (properties: INodeProperty[], property: INodeProperty) => number;
export declare const calculateCycleStartDateEnabled: (properties: INodeProperty[], property: INodeProperty) => boolean;
export declare const calculateCycleStartDate: (properties: INodeProperty[], property: INodeProperty) => string;
export {};
