import { IMethodResult } from '@jacquesparis/objects-model';
import { EntityName, ObjectNode } from '../../models';
import { CurrentContext, InsideRestService, ObjectNodeService, ObjectTreeService, ObjectTypeService } from '../../services';
import { ActionEntityService } from '../../services/action-entity/action-entity.service';
import { TransientEntityService } from '../../services/transient-entity/transient-entity.service';
import { UriCompleteService } from '../../services/uri-complete/uri-complete.service';
export interface LocationServiceContributor {
    locatableItems?: {
        objectType: string;
        entityType: EntityName;
        treeItemsField: string;
        treeItemsConditionField?: string;
        locationField: string;
    }[];
    locationReferences?: {
        objectType: string;
        locationConditionField?: string;
        locationField: string;
    }[];
}
export declare class LocationService {
    private actionEntityService;
    private objectTreeService;
    private objectNodeService;
    private objectTypeService;
    private transientEntityService;
    private insideRestService;
    private uriCompleteService;
    private locatableItems;
    private locationReferences;
    constructor(actionEntityService: ActionEntityService, objectTreeService: ObjectTreeService, objectNodeService: ObjectNodeService, objectTypeService: ObjectTypeService, transientEntityService: TransientEntityService, insideRestService: InsideRestService, uriCompleteService: UriCompleteService);
    private findMedian;
    setLocationReference(objectNode: ObjectNode, args: {}, ctx: CurrentContext): Promise<IMethodResult>;
    private getExistingLocations;
    completeLocationReferenceNode(objectNode: ObjectNode, ctx: CurrentContext): Promise<void>;
    registerLocationProvider(contributor: LocationServiceContributor): void;
    completeLocatableItemsHolderNode(objectNode: ObjectNode, ctx: CurrentContext): Promise<void>;
    private setPosition;
    private getLocatableItems;
    private setPositions;
    setResourcesLocation(objectNode: ObjectNode, args: {
        locationPosition?: string;
        forced?: boolean;
        recursively?: boolean;
    }, ctx: CurrentContext): Promise<IMethodResult>;
    private getLocationReferenceFields;
    private getPositionFromNode;
    propagateLocation(objectNode: ObjectNode, args: {
        forced?: boolean;
        recursively?: boolean;
    }, ctx: CurrentContext): Promise<IMethodResult>;
}
