import type { UmbContentTypeModel, UmbPropertyContainerTypes, UmbPropertyTypeContainerMergedModel, UmbPropertyTypeContainerModel, UmbPropertyTypeModel } from '../types.js';
import { type UmbDetailRepository, type UmbRepositoryResponse, type UmbRepositoryResponseWithAsObservable } from '../../../core/repository/index.js';
import { type UmbDataTypeDetailModel } from '../../../data-type/index.js';
import type { UmbControllerHost } from '../../../../libs/controller-api/index.js';
import type { MappingFunction, Observable } from '../../../../libs/observable-api/index.js';
import { UmbControllerBase } from '../../../../libs/class-api/index.js';
type UmbPropertyTypeUnique = UmbPropertyTypeModel['unique'];
/**
 * Manages a structure of a Content Type and its properties and containers.
 * This loads and merges the structures of the Content Type and its inherited and composed Content Types.
 * To help manage the data, there is two helper classes:
 * - {@link UmbContentTypePropertyStructureHelper} for managing the structure of properties, optional of another container or root.
 * - {@link UmbContentTypeContainerStructureHelper} for managing the structure of containers, optional of another container or root.
 */
export declare class UmbContentTypeStructureManager<T extends UmbContentTypeModel = UmbContentTypeModel> extends UmbControllerBase {
    #private;
    whenLoaded(): Promise<boolean>;
    readonly contentTypes: Observable<T[]>;
    readonly ownerContentType: Observable<T | undefined>;
    readonly ownerContentTypeAlias: Observable<string | undefined>;
    readonly ownerContentTypeName: Observable<string | undefined>;
    readonly ownerContentTypeCompositions: Observable<import("../types.js").UmbContentTypeCompositionModel[] | undefined>;
    readonly contentTypeCompositions: Observable<import("../types.js").UmbContentTypeCompositionModel[]>;
    getContentTypeCompositions(): Promise<import("../types.js").UmbContentTypeCompositionModel[]>;
    getOwnerContentTypeCompositions(): Promise<import("../types.js").UmbContentTypeCompositionModel[]>;
    readonly contentTypeProperties: Observable<UmbPropertyTypeModel[]>;
    getContentTypeProperties(): Promise<UmbPropertyTypeModel[]>;
    readonly contentTypeDataTypeUniques: Observable<string[]>;
    /**
     * Get an observable for the data type detail of a data type that is in use by this content type structure.
     * @param {string} dataTypeUnique - The unique identifier of the data type.
     * @returns {Observable<UmbDataTypeDetailModel | undefined>} An observable that emits the data type detail or undefined.
     */
    contentTypeDataTypeDetailOf(dataTypeUnique: string): Observable<UmbDataTypeDetailModel | undefined>;
    readonly contentTypeHasProperties: Observable<boolean>;
    readonly contentTypePropertyAliases: Observable<string[]>;
    readonly contentTypeUniques: Observable<string[]>;
    readonly contentTypeAliases: Observable<string[]>;
    readonly contentTypeLoaded: Observable<boolean>;
    readonly variesByCulture: Observable<boolean | undefined>;
    readonly variesBySegment: Observable<boolean | undefined>;
    containerById(id: string): Observable<UmbPropertyTypeContainerModel | undefined>;
    constructor(host: UmbControllerHost, typeRepository: UmbDetailRepository<T> | string);
    /**
     * loadType will load the ContentType and all inherited and composed ContentTypes.
     * This will give us all the structure for properties and containers.
     * @param {string} unique - The unique of the ContentType to load.
     * @returns {Promise} - Promise resolved
     */
    loadType(unique: string): Promise<UmbRepositoryResponseWithAsObservable<T | undefined>>;
    /**
     * setType will set the ContentType from already-fetched data and load all inherited and composed ContentTypes.
     * This is useful when the content type has already been fetched (e.g., via bulk fetch) and you want to avoid re-fetching.
     * @param {T} contentType - The ContentType to set.
     * @returns {Promise} - Promise resolved when the content type and all compositions are loaded.
     */
    setType(contentType: T): Promise<UmbRepositoryResponseWithAsObservable<T | undefined>>;
    createScaffold(preset?: Partial<T>): Promise<UmbRepositoryResponse<T>>;
    /**
     * Save the owner content type. Notice this is for a Content Type that is already stored on the server.
     * @returns {Promise} - A promise that will be resolved when the content type is saved.
     */
    save(): Promise<T>;
    /**
     * Reload the owner content type.
     * @returns {Promise} - A promise that will be resolved when the content type is reloaded.
     */
    reload(): Promise<T>;
    /**
     * Create the owner content type. Notice this is for a Content Type that is NOT already stored on the server.
     * @param {string | null} parentUnique - The unique of the parent content type
     * @returns {Promise} - a promise that is resolved when the content type has been created.
     */
    create(parentUnique: string | null): Promise<T>;
    /** Public methods for consuming structure: */
    ownerContentTypeObservablePart<R>(mappingFunction: MappingFunction<T | undefined, R>): Observable<R>;
    getOwnerContentType(): T | undefined;
    getOwnerContentTypeName(): string | undefined;
    getOwnerContentTypeUnique(): string | undefined;
    /**
     * Sets the owner content type unique identifier without loading data.
     * This is useful when you need to register the structure synchronously before async initialization.
     * @param {string} unique - The unique identifier to set.
     */
    setOwnerContentTypeUnique(unique: string): void;
    getVariesByCulture(): boolean | undefined;
    getVariesBySegment(): boolean | undefined;
    /**
     * Figure out if any of the Content Types has a Property.
     * @returns {boolean} - true if any of the Content Type in this composition has a Property.
     */
    getHasProperties(): boolean;
    updateOwnerContentType(entry: Partial<T>): void;
    getContentTypes(): T[];
    getContentTypeUniques(): string[];
    getContentTypeAliases(): string[];
    /**
     * Ensure a container exists for a specific Content Type. Otherwise clone it.
     * @param {string} containerId - The container to ensure exists on the given ContentType.
     * @param {string} contentTypeUnique - The content type to ensure the container for.
     * @returns {Promise<UmbPropertyTypeContainerModel | undefined>} - The container found or created for the owner ContentType.
     */
    ensureContainerOf(containerId: string, contentTypeUnique: string): Promise<UmbPropertyTypeContainerModel | undefined>;
    /**
     * Clone a container to a specific Content Type.
     * @param {string} containerId - The container to clone, assuming it does not already exist on the given Content Type.
     * @param {string} toContentTypeUnique - The content type to clone to.
     * @returns {Promise<UmbPropertyTypeContainerModel | undefined>} - The container cloned or found for the owner ContentType.
     */
    cloneContainerTo(containerId: string, toContentTypeUnique?: string): Promise<UmbPropertyTypeContainerModel | undefined>;
    ensureContainerNames(contentTypeUnique: string | null, type: UmbPropertyContainerTypes, parentId?: string | null): void;
    createContainer(contentTypeUnique: string | null, parentId?: string | null, type?: UmbPropertyContainerTypes, sortOrder?: number): Promise<UmbPropertyTypeContainerModel>;
    insertContainer(contentTypeUnique: string | null, container: UmbPropertyTypeContainerModel): Promise<{
        id: string;
        parent: {
            id: string;
        } | null;
        name: string;
        type: UmbPropertyContainerTypes;
        sortOrder: number;
    }>;
    makeEmptyContainerName(containerId: string): string;
    /**
     *
     * @param {string} containerId - The id of the container to make unique
     * @param {string} newName - The new name to make unique
     * @returns
     */
    makeContainerNameUniqueForOwnerContentType(containerId: string, newName: string): string | null;
    updateContainer(contentTypeUnique: string | null, containerId: string, partialUpdate: Partial<UmbPropertyTypeContainerModel>): Promise<void>;
    removeContainer(contentTypeUnique: string | null, containerId?: string | null, args?: {
        preventRemovingProperties?: boolean;
    }): Promise<void>;
    insertProperty(contentTypeUnique: string | null, property: UmbPropertyTypeModel): Promise<void>;
    removeProperty(contentTypeUnique: string | null, propertyUnique: string): Promise<void>;
    updateProperty(contentTypeUnique: string | null, propertyUnique: string, partialUpdate: Partial<UmbPropertyTypeModel>): Promise<void>;
    propertyStructureById(propertyUnique: string): Promise<Observable<UmbPropertyTypeModel | undefined>>;
    propertyStructureByAlias(propertyAlias: string): Promise<Observable<UmbPropertyTypeModel | undefined>>;
    getPropertyStructureById(propertyUnique: string): Promise<UmbPropertyTypeModel | undefined>;
    getOwnerPropertyById(propertyUnique: string | null): Promise<UmbPropertyTypeModel | undefined>;
    getOwnerPropertiesOf(containerId: string | null): Promise<Array<UmbPropertyTypeModel> | undefined>;
    getPropertyStructureByAlias(propertyAlias: string): Promise<UmbPropertyTypeModel | undefined>;
    hasPropertyStructuresOf(containerId: string | null): Observable<boolean>;
    rootPropertyStructures(): Observable<UmbPropertyTypeModel[]>;
    propertyStructuresOf(containerId: string | null): Observable<UmbPropertyTypeModel[]>;
    propertyStructuresOfGroupIds(groupIds: Array<string>): Observable<UmbPropertyTypeModel[]>;
    hasPropertyStructuresOfGroupIds(groupIds: Array<string>): Observable<boolean>;
    hasPropertyStructuresOfRoot(): Observable<boolean>;
    rootContainers(containerType: UmbPropertyContainerTypes): Observable<UmbPropertyTypeContainerModel[]>;
    getRootContainers(containerType: UmbPropertyContainerTypes): Promise<UmbPropertyTypeContainerModel[]>;
    hasRootContainers(containerType: UmbPropertyContainerTypes): Promise<Observable<boolean>>;
    ownerContainersOf(containerType: UmbPropertyContainerTypes, parentId: string | null): Observable<UmbPropertyTypeContainerModel[]>;
    getOwnerContainerById(id: string | null): UmbPropertyTypeContainerModel | undefined;
    getOwnerContainers(containerType: UmbPropertyContainerTypes, parentId: string | null): Array<UmbPropertyTypeContainerModel> | undefined;
    isOwnerContainer(containerId: string): boolean | undefined;
    containersOfParentId(parentId: string, containerType: UmbPropertyContainerTypes): Observable<UmbPropertyTypeContainerModel[]>;
    containersByNameAndType(name: string, containerType: UmbPropertyContainerTypes): Observable<UmbPropertyTypeContainerModel[]>;
    containersByNameAndTypeAndParent(name: string, containerType: UmbPropertyContainerTypes, parentName: string | null, parentType?: UmbPropertyContainerTypes): Observable<UmbPropertyTypeContainerModel[]>;
    getContentTypeOfContainer(containerId: string): T | undefined;
    contentTypeOfProperty(propertyId: UmbPropertyTypeUnique): Observable<T | undefined>;
    /**
     * Get all property aliases for the content type including inherited and composed content types.
     * @returns {Promise<Array<string>>} - A promise that will be resolved with the list of all content type property aliases.
     */
    getContentTypePropertyAliases(): Promise<string[]>;
    clear(): void;
    destroy(): void;
    readonly contentTypeMergedContainers: Observable<UmbPropertyTypeContainerMergedModel[]>;
    mergedContainersOfId(id: string): Observable<UmbPropertyTypeContainerMergedModel | undefined>;
    /**
     *
     * Find merged containers that match the provided container ids.
     * Notice if you can provide one or more ids matching the same container and it will still only return return the matching container once.
     * @param containerIds - An array of container ids to find merged containers for.
     * @returns {Observable} - An observable that emits the merged containers that match the provided container ids.
     */
    /**
     * Find a merged container that match the provided container id.
     * @param {string} id - The id to find the merged container of.
     * @returns {UmbPropertyTypeContainerMergedModel | undefined} - The merged containers that match the provided container ids.
     */
    getMergedContainerById(id: string): UmbPropertyTypeContainerMergedModel | undefined;
    /**
     * Find a merged container that match the provided merged-container key.
     * @param {string} key - The key to find the merged container of.
     * @returns {UmbPropertyTypeContainerMergedModel | undefined} - The merged containers that match the provided merged-container key.
     */
    getMergedContainerByKey(key: string): UmbPropertyTypeContainerMergedModel | undefined;
    /**
     *
     * Find merged child containers that are children of the provided parent container ids.
     * Notice this will find matching containers and include their child containers in this.
     * @param containerIds - An array of container ids to find merged child containers for.
     * @param searchId
     * @param type - The type of the containers to find.
     * @returns {Observable} - An observable that emits the merged child containers that match the provided container ids.
     */
    mergedContainersOfParentIdAndType(searchId: string | null, type: UmbPropertyContainerTypes): Observable<Array<UmbPropertyTypeContainerMergedModel>>;
}
export {};
