/*!
Copyright © 2024 Open Text Corporation, All Rights Reserved.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
import { ItemManager } from '@opentext/forms-data-manager';
import { OcpdBaseSchemaService } from './ocpd-base-schema-service';
import { Config } from '../models/control-config';
import { OcpdComponentRegister } from './ocpd-component-register';
import { OcpdFormClientAPIService } from './ocpd-form-client-api-service';
import { OcpdConfigurationManager } from './ocpd-configuration-manager';
import { OcpdFormSchemaManager } from './ocpd-form-schema-manager';
import { ItemManagerLocalizations } from '../models/localization-types';
import { OcpdStringLocalizationHelper } from './ocpd-string-localization';
import { OcpdDatagridColumnChooser } from '../dialogs/ocpd-data-grid-column-chooser';
import { OcpdConstraintsManager } from './ocpd-constraints-manager';
export declare class OcpdItemManagerHelper {
    private static _instance;
    promiseQueue: {};
    _ocpdFormSchemaManager: OcpdFormSchemaManager;
    _ocpdConstraintsManager: OcpdConstraintsManager;
    _ocpdBaseSchemaService: OcpdBaseSchemaService;
    _ocpdComponentRegister: OcpdComponentRegister;
    _ocpdFormClientAPIService: OcpdFormClientAPIService;
    _ocpdStringLocalizationHelper: OcpdStringLocalizationHelper;
    _ocpdDatagridColumnChooser: OcpdDatagridColumnChooser;
    _localeData: ItemManagerLocalizations;
    _instantiatedFormCallbacks: any[];
    _itemManager: ItemManager;
    constructor();
    removeRuntimeCallbackByItemId(itemId: any, key: any): void;
    addRuntimeCallback(sendMessageToRuntimeCallback: any, itemId: any, key: any): void;
    sendMessageToRuntime(data: any): Promise<void>;
    afterDeleteRowCallback(propertyPath: string, controlHTMLElementId: string, rowId: string): void;
    resolveToOneReference(propertyPath: string, rootItemId: string): string;
    executeActionInterceptor(args: any): void;
    postMessageToClient(data: any): Promise<{
        data: any;
    }>;
    getDefaultValueForPropertyPreview(propertyPath: string): any;
    beforeOpenDropdownInterceptor(data: any, itemId: any, options: any): Promise<any>;
    readOnlyDataInterceptor(data: any, itemId: any): any;
    removeTrailingEmptyValues(values: any[]): void;
    getAutoCompleteTokenOptions(itemId: any): ({
        value: string;
        text: string;
        class: string;
    } | {
        value: string;
        text: any;
        class?: undefined;
    })[];
    getTextBoxOptions(dataType: any, localeData: any): ({
        value: string;
        text: string;
        class: string;
    } | {
        value: string;
        text: any;
        class?: undefined;
    })[];
    getTextAreaOptions(localeData: any): ({
        value: string;
        text: string;
        class: string;
    } | {
        value: string;
        text: any;
        class?: undefined;
    })[];
    controlHasBeenRemovedFromContainer(oldValue: any): boolean;
    controlHasBeenAddedToContainer(newValue: any): boolean;
    controlHasBeenMovedBetweenContainers(newValue: any, oldValue: any): any;
    sendMessage(propertyPath: any, elementId: any, errorMessage: any): Promise<void>;
    rebind(propertyPath: any, elementId: any): Promise<void>;
    getCanvasIds(): string[];
    validateModelData(schema: any, itemId: any, schemas: any[], model?: undefined | Model): Promise<{
        data: any[];
    }>;
    clearErrors(): void;
    repeatingCallback(schema: any): any;
    notifyRuntimeWithProblems(problems: any, propertyPath: any, itemId: any, propertyPathOverride?: any, schema?: any): Promise<void>;
    isLocalizableProperty(propertyPath: string): boolean;
    enableDisableNumberOfColumns(newValue: any, elementId: any): Promise<void>;
    callPropertyChanged(propertyPath: string, oldValue: any, newValue: any, elementId: string, isUndo: boolean, transactionId?: string): Promise<void>;
    beforeValueChangeCallback(propertyPath: string, oldValue: any, newValue: any, elementId: string, isUndo: boolean, transactionId: string, controlHTMLElementId: any, rowGuid: any): Promise<{
        returnValue: any;
        errorHandler?: undefined;
    } | {
        returnValue: any;
        errorHandler: any;
    }>;
    constructModelForValidation(propertyPath: string, value: any, id: string, schemaId: string): Model;
    isValidProblems(problems: any[], propertyPath: string): boolean;
    themeSelectorChanged(elementId: any, newValue: any): Promise<void>;
    private handleDesignerThemeChange;
    private handleCanvasThemeChange;
    private handlePreviewThemeChange;
    isOutOfBoxTheme(themeName: string): boolean;
    setDefaultThemeInThemeSelectorModel(itemId: any): Promise<void>;
    afterValueChangeCallback(propertyPath: string, oldValue: any, newValue: any, elementId: string, isUndo: boolean, transactionId: string, controlHTMLElementId: any, rowGuid: any): Promise<void>;
    addMissingSchemaProperties(model: Model): any;
    getParentConfig(config: Config): Config | undefined;
    canIncreaseMaximumRows(config: Config, newRowCount: any): boolean;
    doesControlSupportAutoHeight(type: string): boolean;
    cloneLocalizationsForProperty(oldPropertyName: string, newPropertyName: string, deleteSource: boolean): void;
    updatePropertyName(oldValue: any, newPropertyName: any, config: Config, transactionId: any, schemaItemId: any, isValid: boolean, workingModel: any, modelsWithSamePropertyPath: Model[]): Promise<boolean>;
    toggleUndoRedoButton(): void;
    deleteModels(models: Model[]): void;
    updateLocalisableString(currentFormLocale: any, schemaPropertyPath: any, elementId: any, type: any, queueEntry: any, propertyPathToLocalise: any, config: any, allowEmptyValue?: boolean): Promise<void>;
    updateLocalisableStrings(newValue: any): Promise<void>;
    updateLocalisableValues(config: Config, elementId: any, queueEntry: any): Promise<void>;
    getConfig(id: string): Config | undefined;
    doesControlSupportsHaveSchemaBackingProperty(type: string): boolean;
    getConfigsByParentId(parentId: any, returnModel?: boolean): Config[] | Model[];
    addModelToItemStateAndActiveForm(model: any, id: any, schema: any): void;
    addModelToItemState(model: any, id: any, schema: any): void;
    doesModelExist(id: any): boolean;
    getModel(id: any): Model;
    getModels(): {
        [key: string]: any;
    };
    deleteModel(id: any): void;
    getValue(propertyPath: any, elementId: any, data?: {}): any;
    getFormSchemaManager(): OcpdFormSchemaManager;
    getConstraintsManager(): OcpdConstraintsManager;
    setValue(propertyPath: any, value: any, data: any, createUndo: any, itemId: any, messageId?: any): Promise<void>;
    change(propertyPath: any, value: any, itemId: any, undoTransactionId: string): Promise<void>;
    setTransactionId(undoTransactionId: any): void;
    createUndoEntry(propertyPath: any, value: any, data: any, undoTransactionId: any, itemId: any): void;
    cleanRuntimeSchema(schema: any): any;
    getModelsByPropertyPath(allModels: Model[], propertyPath: string): Model[];
    getAllSchemas(): any[];
    addBaseSchemas(): void;
    getSchemaById(id: string): any;
    getLastTransactionId(): any;
    clearCache(): void;
    forceUIRefresh(itemId: any, propertyPath?: string): Promise<void>;
    findRootModel(models: Model[], rootModelId: any): Model;
    removeCallback(container: any, key: any): void;
    findAllChildrenOfContainer(container: Config, models: Model[], consumedModels: Model[]): void;
    findChildrenOfContainer(container: Config, models: Model[]): Model[];
    getAllControlModels(): Model[];
    getAllModelsThatBelongToContainer(rootModelId: any): Model[];
    getAllModelsThatHasSamePropertyPath(propertyPath: string): Model[];
    setParentId(itemId: any, newParentItemId: any, undoTransactionId: any): Promise<void>;
    createInstanceOfRuntime(dataSource: string, modelItemId: any, model: any, UIConfig: any, className: string, rootSchema: any, rules?: any[], theme?: string, locale?: string, dataLocalisationFolder?: string, systemConfig?: {
        currentLocale: any;
        defaultLocale: any;
    }, overrideThemes?: {}, defaultThemeInformation?: {}, additionalSchemas?: any[]): Promise<any>;
    getSystemConfig(): {
        currentLocale: any;
        defaultLocale: any;
    };
    createInstanceOfDialog(dataSource: string, modelItemId: any, model: any, UIConfig: any, className: string, rootSchema: any, buttons: any, closeInterceptor: any, dialogCompleteEventHandler: any, rules?: any[], theme?: string, locale?: string, dataLocalisationFolder?: string, systemConfig?: {
        currentLocale: any;
        defaultLocale: any;
    }, overrideThemes?: {}, defaultThemeInformation?: {}, additionalSchemas?: any[]): Promise<{
        root: HTMLElement;
        sendMessageToRuntime: any;
    }>;
    addConfigSchemas(ocpdConfigurationManager: OcpdConfigurationManager): void;
    private addPropertyToModelSchema;
    private removePropertyFromModelSchema;
    private getInformationFromModelTree;
    private canPropertyBeDeleted;
    /**
     * Get all models that belong to a specific schema id
     * @param targetSchemaId Target schema id
     * @param sourceModelData Optional source model data to get row index from
     * @returns Array of models that belong to the specified schema id
     */
    getReferenceModels(targetSchemaId: string, sourceModelData?: any, rowIndex?: string): {
        content: Model;
    }[];
    addRowInterceptor(...args: any[]): Promise<any>;
    extractPropertyFromLocalisation(localeObject: any, propertyPathToLocalise: string): any;
    getLocalisedPropertyValueFromAnyWhere(propertyPath: string, locale: string, config: Config, propertyPathToLocalise: string, schemaPropertyInfo: SchemaPropertyInfo): any;
    getPropertyValueFromAnyWhere(config: Config, propertyNameInSchema: string, schemaPropertyInfo: SchemaPropertyInfo): any;
    getSchemasForPropertyFromAnyWhere(propertyPath: string, config: Config): SchemaPropertyInfo;
    isNumericControlType(dataType: string): boolean;
    isIntegerControlType(dataType: string): boolean;
    isNumberControlType(dataType: string): boolean;
    doesControlSupportsPrecision(dataType: string): boolean;
    doesControlSupportsScale(dataType: string): boolean;
    getPlaceholderForNumerics(config: Config, precision?: number, scale?: number): string;
    getCurrencyOptions(): any[];
}
export declare class Model {
    id: string;
    schemaId: string;
    data: any;
}
export declare class SchemaPropertyInfo {
    modelSchemaId: string;
    modelSchemaProperty: any;
    modelSchema: any;
    formSchemaId: string;
    formSchemaProperty: any;
    formSchema: any;
}
