import { Asset, AssetDescriptor, Attribute, AttributeDescriptor, AttributeEvent, GeofencePredicate, JsonRulesetDefinition, NameHolder, NameValueHolder, PushNotificationMessage, ValueDescriptor, ValueDescriptorHolder, ValueFormat, ValueConstraint, MetaItemDescriptor } from "@openremote/model";
export declare class Deferred<T> {
    protected _resolve: (value: T | PromiseLike<T>) => void;
    protected _reject: (reason?: any) => void;
    protected _promise: Promise<T>;
    get resolve(): (value: T | PromiseLike<T>) => void;
    get reject(): (reason?: any) => void;
    get promise(): Promise<T>;
    constructor();
}
export interface GeoNotification {
    predicate: GeofencePredicate;
    notification?: PushNotificationMessage;
}
export declare function getBrowserLanguage(): string;
export declare function getQueryParameters(queryStr: string): any;
export declare function getQueryParameter(parameter: string): any | undefined;
export declare function getGeoNotificationsFromRulesSet(rulesetDefinition: JsonRulesetDefinition): GeoNotification[];
export declare function isTimeDuration(time?: string): boolean;
export declare function isTimeDurationPositiveInfinity(time?: string): boolean;
export declare function isTimeDurationNegativeInfinity(time?: string): boolean;
export declare function isObject(object: any): boolean;
export declare function objectsEqual(obj1?: any, obj2?: any, deep?: boolean): boolean;
/**
 * Deep diff between two object, using lodash
 * @param  {Object} object Object compared
 * @param  {Object} base   Object to compare with
 * @return {Object}        Return a new object who represent the diff
 */
export declare function difference(object?: any, base?: any): any;
export declare function arrayRemove<T>(arr: T[], item: T): void;
export declare function sentenceCaseToCamelCase(str: string | undefined): string;
export declare function camelCaseToSentenceCase(str: string | undefined): string;
export declare function stringMatch(needle: string, haystack: string): boolean;
export declare function capitaliseFirstLetter(str: string | undefined): string | undefined;
export declare function getEnumKeyAsString(enm: object, val: string): string | undefined;
export declare function getWeekNumber(date: Date): number;
export declare function formatCronString(years?: string | number | string[], months?: string | string[] | number[], days?: string | number[], hours?: string | number[], minutes?: string | number[], seconds?: string | number[], daysOfTheWeek?: string): string;
export declare function dateToCronString(date: Date): string;
export declare function cronStringToISOString(cronString: string, isUTC: boolean): string | undefined;
export declare function getMetaValue(name: string | NameHolder, attribute: Attribute<any> | undefined, descriptor?: ValueDescriptorHolder | ValueDescriptor | string): any | undefined;
export declare function hasMetaItem(name: string | NameHolder, attribute: Attribute<any> | undefined, descriptor?: AttributeDescriptor | string): boolean;
export declare function isPrimitiveMetaItem(descriptor: ValueDescriptor | undefined): boolean;
export declare function isComplexMetaItem(descriptor: ValueDescriptor | undefined): boolean;
export declare function getPrimitiveMetaItems(): MetaItemDescriptor[];
export declare function getComplexMetaItems(): MetaItemDescriptor[];
export declare function getAssetTypeLabel(type: string | AssetDescriptor | undefined): string;
export declare function getValueDescriptorLabel(descriptor: ValueDescriptor | undefined | string): string;
export declare function getAllowedValueLabel(allowedValue: string, fallback?: string): string | undefined;
export declare function getMetaItemNameValueHolder(metaNameOrDescriptor: MetaItemDescriptor | string, value: any): NameValueHolder<any>;
export declare function getAttributeLabel(attribute: Attribute<any> | undefined, descriptor: AttributeDescriptor | undefined, assetType: string | undefined, showUnits: boolean, fallback?: string): string;
export declare function getMetaLabel(metaItem: NameValueHolder<any> | undefined, descriptor: MetaItemDescriptor | string, assetType: string | undefined, showUnits: boolean, fallback?: string): string;
export declare function getAttributeValueAsString(attribute: Attribute<any>, descriptor: AttributeDescriptor | string | undefined, assetType: string | undefined, showUnits: boolean, fallback?: string): string;
export declare function getMetaValueAsString(metaItem: NameValueHolder<any> | undefined, descriptor: MetaItemDescriptor | string, assetType: string | undefined, showUnits: boolean, fallback?: string): string;
export declare function getValueAsString(value: any, formatProvider: () => ValueFormat | undefined, language?: string, fallback?: string): string;
/**
 * Resolve supplied units using current translation locale; and optionally apply the units to the supplied value (this
 * is useful for units containing currency which in some locales is prefixed to the value e.g. £0.00 kW/hr rather than
 * 0.00 £kW/hr)
 */
export declare function resolveUnits(units: string[] | undefined, valueStr?: string): string;
/**
 * Looks for {@link ValueConstraint[]} for the specified {@link Attribute} (see {@link getValueFormatConstraintOrUnits})
 */
export declare function getAttributeValueConstraints(attribute: Attribute<any> | undefined, descriptor: AttributeDescriptor | string | undefined, assetType: string | undefined): ValueConstraint[] | undefined;
/**
 * Looks for {@link ValueConstraint[]} for the specified {@link NameValueHolder} (see {@link getValueFormatConstraintOrUnits})
 */
export declare function getMetaValueConstraints(metaItem: NameValueHolder<any> | undefined, descriptor: MetaItemDescriptor | string, assetType: string | undefined): ValueConstraint[] | undefined;
/**
 * Looks for units string[] for the specified {@link Attribute} (see {@link getValueFormatConstraintOrUnits})
 */
export declare function getAttributeUnits(attribute: Attribute<any> | undefined, descriptor: AttributeDescriptor | ValueDescriptor | string | undefined, assetType: string | undefined): string[] | undefined;
/**
 * Looks for units string[] for the specified {@link MetaItem} (see {@link getValueFormatConstraintOrUnits})
 */
export declare function getMetaUnits(metaItem: NameValueHolder<any> | undefined, descriptor: MetaItemDescriptor | string, assetType: string | undefined): string[] | undefined;
/**
 * Looks for a {@link ValueFormat} for the specified {@link Attribute} (see {@link getValueFormatConstraintOrUnits})
 */
export declare function getAttributeValueFormat(attribute: Attribute<any> | undefined, descriptor: AttributeDescriptor | string | undefined, assetType: string | undefined): ValueFormat | undefined;
/**
 * Looks for a {@see ValueFormat} for the specified {@link MetaItem} (see {@link getValueFormatConstraintOrUnits})
 */
export declare function getMetaValueFormat(metaItem: NameValueHolder<any> | undefined, descriptor: MetaItemDescriptor | string, assetType: string | undefined): ValueFormat | undefined;
export declare function mergeObjects(a: object | undefined, b: object | undefined, mergeArrays: boolean): object;
/**
 * Immutable update of an asset using the supplied attribute event
 */
export declare function updateAsset(asset: Asset, event: AttributeEvent): Asset;
export declare function loadJs(url: string): Promise<unknown>;
export declare function sortByNumber<T>(valueExtractor: (item: T) => number): (a: T, b: T) => number;
export declare function sortByString<T>(valueExtractor: (item: T) => string): (a: T, b: T) => number;
export interface RequestEventDetail<T> {
    allow: boolean;
    detail: T;
}
export declare function dispatchCancellableEvent<T>(target: EventTarget, event: CustomEvent<RequestEventDetail<T>>): Promise<RequestEventDetail<T>>;
export declare function blobToBase64(blob: Blob): Promise<unknown>;
//# sourceMappingURL=util.d.ts.map