import { ProgressSpinnerService } from '../_messages/progress-spinner.service';
import { ErrorMessagesService } from '../_messages/error-messages.service';
import { Utils } from '../_helpers/utils';
import * as i0 from "@angular/core";
export interface AngularPConnectData {
    compID?: string;
    unsubscribeFn?: Function;
    validateMessage?: string;
    actions?: {
        onChange: Function;
        onBlur: Function;
    };
}
export declare class AngularPConnectService {
    private psService;
    private erService;
    private utils;
    /**
     * Local variable for access to the store once the service is connected to it.
     */
    private theStore;
    /**
     * Local variable used to compute the next componentID
     */
    private counterComponentID;
    /**
     * Local array used to store the association of an component to its most recent "props"
     *  where "props" is the object containing the component's getConfigProps along with
     * anything added by populateAdditionalProps.
     * Each entry is: { __componentID__: _the component's most recent props_ }
     */
    private componentPropsArr;
    private static bLogging;
    constructor(psService: ProgressSpinnerService, erService: ErrorMessagesService, utils: Utils);
    /**
     * Returns a unique (for this session) ComponentID that should
     * be used for that component to update its most recent props
     * (which can also be compared against its previous value
     * before updating). Note that this returns a string so we can use
     * it as a key in an associative array
     * @returns the next componentID
     */
    private getNextComponentId;
    /**
     * The Calling object (inComp) subscribes to store changes.
     * @param inComp The component that's subscribing to the store
     * @param inCallback The component's callback function (typically called onStateChange) that will
     * be called when the store changes.
     * @returns The **unsubscribe** function that should be called when the component needs
     * to unsubscribe from the store. (Typically during ngOnDestroy)
     */
    private subscribeToStore;
    /**
     * Gets the Component's properties that are used (a) to populate componentPropsArr
    //  and (b) to determine whether the component should update itself (re-render)
     * @param inComp The component whose properties are being obtained
     */
    private getComponentProps;
    /**
     * Returns the unique id for given component created when registering
     * Otherwise, return undefined.
     * @param inComp The component whose property is being requested.
     */
    getComponentID(inComp: any): string;
    /**
     * Returns the value of requested property for the component if it exists.
     * Otherwise, return undefined.
     * @param inComp The component whose property is being requested.
     * @param inProp The property being requested.
     */
    getComponentProp(inComp?: any, inProp?: string): any;
    /**
     *
     * @returns The current complete set of resolved properties that are associated with
     * this component.
     * This is the full set of properties that are tracked in Redux for this component.
     */
    getCurrentCompleteProps(inComp?: any): Object;
    /**
     * Registers the component and its callback function. When a component calls this method
     * (typically from its ngOnInit), the component is given a unique componentID (for this session)
     * and subscribes the component to the store. As a side effect, it also assigns the component's
     * actions (from its metadata) to the component's ___actions___ and binds the component's callback
     * (passed in as ___inCallback___) to the component. If a problem is encountered, an empty object,
     * {}, is returned.
     * @param inComp The component being registered and subscribed
     * @param inCallback The component's callback function (typically called onStateChange) that
     * will be called whenever the state changes.
     * @returns A JSON object with the following keys:
     * compID: the unique ID associated with this component,
     * unsubscribeFn: the function to be called when the component needs to unsubscribe from the store,
     * validateMessage: any validation/error message that gets generated for this object,
     * actions: any actions that are defined for this object
     */
    registerAndSubscribeComponent(inComp: any, inCallback?: Function | null): AngularPConnectData;
    addFormField(inComp: any): void;
    removeFormField(inComp: any): void;
    /**
     * Returns **true** if the component's entry in ___componentPropsArr___ is
     * the same as the properties that are current associated with the component (___inComp___) passed in.
     * As a side effect, the component's entry in ___componentPropsArr___ is updated.
     * **Note**: It is assumed that the incoming component has the following:
     * (a) a bridgeComponentID _string_ property used as lookup key in ___componentPropsArr___
     * and (b) a ___pConn$___ property used to access functions called in ___getComponentProps___
     *
     * @param inComp The component asking if it should update itself
     * @returns Return **true**: means the component props are different and the component should update itself (re-render).
     * Return **false**: means the component props are the same and the component doesn't need to update (re-render).
     * If the ***inComp*** input is bad, false is also returned.
     */
    shouldComponentUpdate(inComp: any): boolean;
    isPageMessagesEmpty(incomingProps: any): any;
    /**
     * Can be called when the component has encountered a change event
     * @param inComp The component calling the change event
     * @param event The event
     */
    changeHandler(inComp: any, event: any): void;
    /**
     * Can be called when the component has encountered an event (such as blur)
     * @param inComp The component calling the event
     * @param event The event
     */
    eventHandler(inComp: any, event: any): void;
    /**
     * @returns A handle to the application's store
     */
    getStore(): any;
    /**
     * @param bLogMsg If true, will write the stringified state to the store for debugging/inspection
     * @param inComp If supplied, the component that is requesting the store's state
     * @returns A handle to the __state__ of application's store
     */
    getState(bLogMsg?: boolean, inComp?: any): object;
    /**
     *  processActions exposes all actions in the metadata.
     *  Attaches common handler (eventHandler) for all actions.
     */
    private processActions;
    static ɵfac: i0.ɵɵFactoryDeclaration<AngularPConnectService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AngularPConnectService>;
}
