import type { Agile } from '../agile'; export declare class Integration { key: IntegrationKey; frameworkInstance?: F; ready: boolean; integrated: boolean; methods: IntegrationMethods; /** * An Integration is an interface to a UI-Framework, * and allows the easy interaction with that Framework. * * Due to the Integration, AgileTs can be integrated into almost any UI-Framework * without a huge overhead. * * @public * @param config - Configuration object */ constructor(config: CreateIntegrationConfig); } export interface CreateIntegrationConfig extends IntegrationMethods { /** * Key/Name identifier of the Integration. * @default undefined */ key: string; /** * An Instance of the UI-Framework to be represented by the Integration. * For example, in the case of React, the React Instance. * @default undefined */ frameworkInstance?: F; } export interface IntegrationMethods { /** * Binds the Integration to an Agile Instance. * * This method is called shortly after the Integration was registered with an Agile Instance. * It is intended to set up things that are important * for an seamless integration into AgileTs on the UI-Framework side. * * @param agileInstance - Agile Instance into which the Integration is to be integrated. * @return Indicating whether the to integrate Integration is ready on the Framework side. */ bind?: (agileInstance: Agile) => Promise; /** * Method to apply the updated data to the provided UI-Component * in order to trigger a re-render on it. * * This method is called when the value of an [Agile Sub Instance](https://agile-ts.org/docs/introduction/#agile-sub-instance) * bound to the specified UI-Component changes ([Component based Subscription](https://agile-ts.org/docs/core/integration/#component-based)). * The updated Agile Sub Instance values were mapped in the provided `updatedData` object. * * @param componentInstance - Component Instance of the to update UI-Component. * @param updatedData - Data object containing the updated data. */ updateMethod?: (componentInstance: C, updatedData: Object) => void; } export declare type IntegrationKey = string | number;