import { TccExpandableTable } from "../../core/components/tcc-expandable-table/tcc-expandable-table.component";
import { TccET_BIZOBJ } from "../../odata/models/bizobj.model";
import { TccKeyValuePair, TccTranslation } from "../../odata/models/shared.model";
import { TccDesktop } from "./tcc-desktop.class";
export declare namespace TccGetBoProperty {
    export type PropertyTypes = SimpleTypes | TccET_BIZOBJ.ComplexProperty;
    export type SimpleTypes = TccET_BIZOBJ.EnumerationProperty | TccET_BIZOBJ.PrimitiveProperty;
    export interface returnType<T extends PropertyTypes = PropertyTypes> extends internalType<T> {
        FullPath: string[];
    }
    interface internalType<T extends PropertyTypes = PropertyTypes> {
        Property: PropertyTypes;
        Path: string[];
        isTableProperty: boolean;
        SubTypeId?: string;
    }
    export interface ExpandableBoProperty extends TccExpandableTable.RowData {
        property: PropertyTypes;
        expandable?: ExpandableBoProperties;
        subtypeid?: string;
    }
    export type ExpandableBoProperties = ExpandableBoProperty[];
    interface propertyIdMap {
        [propid: string]: internalType;
    }
    interface propTreeItem {
        id: string;
        children?: propTreeItem[];
    }
    interface propertyListByParentId {
        [parentId: string]: propTreeItem[];
    }
    interface propertyListByPath {
        [proppath: string]: string;
    }
    interface propertyListByName {
        [propname: string]: string[];
    }
    interface parsedProperties {
        propertyIdMap: propertyIdMap;
        propertyListByPath: propertyListByPath;
        propertyListByParentId: propertyListByParentId;
        propertyListByName: propertyListByName;
        tableProperties: {
            prop: TccET_BIZOBJ.ComplexProperty;
            props: string[];
        }[];
        headerProperties: Array<string>;
        propertyTree: propTreeItem[];
        barcodeProperty: PropertyTypes;
    }
    export interface iHandler {
        get HeaderPropIds(): Array<string>;
        get HeaderProperties(): Array<SimpleTypes>;
        get TableProperties(): Array<SimpleTypes>;
        get DefaultTableProperty(): TccET_BIZOBJ.ComplexProperty;
        get AllTableProperties(): {
            prop: TccET_BIZOBJ.ComplexProperty;
            props: string[];
        }[];
        get ExpandableBoProperties(): ExpandableBoProperties;
        get SubTypeId(): string;
        set SubTypeId(subtypeid: string);
        get SubType(): TccET_BIZOBJ.SubType;
        hasProperty(id: string): boolean;
        getProperty(id: string, businessObject?: TccET_BIZOBJ.BusinessObject): returnType;
        getPropertyProp(id: string, businessObject?: TccET_BIZOBJ.BusinessObject): PropertyTypes;
        getPropertyByPath(path: string[] | string, name?: string): returnType;
        pathToId(path: string[] | string): string;
        getPropertyByName(name: string, path?: string[] | string, businessObject?: TccET_BIZOBJ.BusinessObject): returnType | returnType[];
        get DefaultHeaderDesktop(): TccET_BIZOBJ.Container;
        get DefaultTableDesktop(): TccET_BIZOBJ.DesktopTable;
        generateDefaultDesktop(prop: SimpleTypes, row: number): TccET_BIZOBJ.DesktopItem;
        addProperty(type: TccET_BIZOBJ.AbstractType, Name: string, parentId: string): PropertyTypes;
        deleteProperty(propId: string, init: boolean): boolean;
        changePropertyType(propId: string, newType: TccET_BIZOBJ.AbstractType, init: boolean): boolean;
        get AllComplexProperties(): {
            property: TccET_BIZOBJ.ComplexProperty;
            path: string[];
        }[];
        getAllPathsKeyValue(inverted?: boolean): TccKeyValuePair[];
        getAllProperties(businessObject?: TccET_BIZOBJ.BusinessObject): PropertyTypes[];
        getAllPropertiesWithPath(businessObject?: TccET_BIZOBJ.BusinessObject): returnType[];
        removeSubtype(SubtypeId: string): boolean;
        generateSubtype(DisplayName: TccTranslation, ParentId?: string): TccET_BIZOBJ.SubType;
        getSubType(subtypeId: string): TccET_BIZOBJ.SubType;
    }
    export function isComplexProperty(prop: PropertyTypes): prop is TccET_BIZOBJ.ComplexProperty;
    export function isEnumProperty(prop: PropertyTypes): prop is TccET_BIZOBJ.EnumerationProperty;
    export function isPrimitiveProperty(prop: PropertyTypes): prop is TccET_BIZOBJ.PrimitiveProperty;
    export function isSimpleProperty(prop: PropertyTypes): prop is SimpleTypes;
    export function getPropertyChildren(prop: TccET_BIZOBJ.ComplexProperty): TccGetBoProperty.PropertyTypes[];
    export function getIPropertyFromContainer(propertyContainer: TccET_BIZOBJ.PropertyContainer): PropertyTypes;
    class propertyController extends TccDesktop implements parsedProperties {
        private baseProperties;
        private subtypeProperties;
        private subtypeId;
        private businessObject;
        barcodeProperty: PropertyTypes;
        propertyIdMap: propertyIdMap;
        propertyListByParentId: propertyListByParentId;
        propertyListByPath: propertyListByPath;
        propertyListByName: propertyListByName;
        tableProperties: {
            prop: TccET_BIZOBJ.ComplexProperty;
            props: string[];
        }[];
        headerProperties: Array<string>;
        propertyTree: propTreeItem[];
        constructor(bo: TccET_BIZOBJ.BusinessObject);
        private init;
        private initSubtypes;
        set SubTypeId(subtypeId: string);
        get SubTypeId(): string;
        get SubType(): TccET_BIZOBJ.SubType;
        /**
         * Add new Subtypes.
         * @param DisplayName
         * @param ParentId
         * @returns partial BusinessObject for patch. Result of patch must be set back into boProp Instance
         */
        generateSubtype(DisplayName: TccTranslation, ParentId?: string, Description?: string): TccET_BIZOBJ.SubType;
        removeSubtype(SubtypeId: string, init?: boolean): boolean;
        private recursiveRemove;
        get BusinessObject(): TccET_BIZOBJ.BusinessObject;
        protected getPropertyContainer(subtypeId: string): TccET_BIZOBJ.PropertyContainer[];
        private fillParsedProperties;
        private getSubTypeParentIds;
        private getRecursiveSubTypeProperties;
        getSubType(subtypeId: string): TccET_BIZOBJ.SubType;
        refresh(SubTypeId?: string): void;
        protected getReturnType(id: string): returnType;
        protected buildReturnType(internalType: internalType): returnType;
        protected getByPath(path: string | string[]): returnType;
        protected getById(id: string): returnType;
        protected getByName(name: string): returnType[];
        pathToId(path: string[] | string): string;
        protected get firstTableProperties(): string[];
        protected get firstTableProperty(): TccET_BIZOBJ.ComplexProperty;
    }
    export class Handler extends propertyController implements iHandler {
        get BoId(): string;
        get HeaderPropIds(): Array<string>;
        get HeaderProperties(): Array<SimpleTypes>;
        get TableProperties(): Array<SimpleTypes>;
        get TablePropertiesWithPath(): Array<returnType>;
        get DefaultTableProperty(): TccET_BIZOBJ.ComplexProperty;
        get AllTableProperties(): {
            prop: TccET_BIZOBJ.ComplexProperty;
            props: string[];
        }[];
        get ExpandableBoProperties(): ExpandableBoProperties;
        hasProperty(id: string): boolean;
        getProperty(id: string): returnType;
        getPropertyProp(id: string): PropertyTypes;
        getPropertyByPath<T extends PropertyTypes = PropertyTypes>(path: string[] | string, name?: string): returnType<T>;
        getPropertyByName(name: string, path?: string[] | string): returnType | returnType[];
        getPropertyIndex(id: string): number;
        getBarcodeProperty(): PropertyTypes;
        get DefaultHeaderDesktop(): TccET_BIZOBJ.Container;
        /**
         * returns a desktop with all properties (header and position). Used for example to monitor all properties.
         */
        getDefaultHeaderDesktop(excludeTable?: boolean): TccET_BIZOBJ.Container;
        generateTableDesktop(propertyId?: string): {
            Name: {
                INT: string;
            };
            Columns: TccET_BIZOBJ.DesktopItem[];
            RootItemId: string;
        };
        get DefaultTableDesktop(): TccET_BIZOBJ.DesktopTable;
        private generateDefaultDesktopFromTreeItem;
        generateDefaultDesktop(prop: PropertyTypes, row: number, parentId?: string): TccET_BIZOBJ.DesktopItem;
        /**
         * Transformativ. Es ist erforderlich den BOPropertyService neu mit dem geänderten BO, über den Parameter init, zu initialisieren.
         */
        addProperty(type: TccET_BIZOBJ.AbstractType.ccAT_Complex, Name: string, parentId: string): TccET_BIZOBJ.ComplexProperty;
        addProperty(type: TccET_BIZOBJ.AbstractType.ccAT_Enumeration, Name: string, parentId: string): TccET_BIZOBJ.EnumerationProperty;
        addProperty(type: TccET_BIZOBJ.AbstractType.ccAT_Primitive, Name: string, parentId: string): TccET_BIZOBJ.PrimitiveProperty;
        addProperty(type: TccET_BIZOBJ.AbstractType, Name: string, parentId: string): TccGetBoProperty.PropertyTypes;
        addCompleteProperty(property: PropertyTypes, parentId: string, index?: number): PropertyTypes;
        /**
         * Transformativ. Es ist erforderlich den BOPropertyService neu mit dem geänderten BO, über den Parameter init, zu initialisieren.
         */
        deleteProperty(propId: string, init?: boolean): boolean;
        /**
         * Transformativ. Es ist erforderlich den BOPropertyService neu mit dem geänderten BO, über den Parameter init, zu initialisieren.
         */
        changePropertyType(propId: string, newType: TccET_BIZOBJ.AbstractType, init?: boolean): boolean;
        get AllComplexProperties(): {
            property: TccET_BIZOBJ.ComplexProperty;
            path: string[];
        }[];
        getAllPathsKeyValue(inverted?: boolean): TccKeyValuePair[];
        getAllProperties(): PropertyTypes[];
        getAllPropertiesWithPath(): returnType[];
        private buildExpandableProp;
        private transformBoProp;
    }
    export {};
}
