import * as i0 from "@angular/core";
export declare class StatePersistence {
    private HISTORY_HANDLER;
    private HISTORY_HANDLER_TYPES;
    private WIDGET_STATE_KEY;
    /**
     * Sets the passed value as the History handler if it exists in the History_Handler_Types object
     * @param val
     */
    setHistoryHandler(val: any): void;
    /**
     * Constructs a unique key for setting state param by using the viewParent property of a widget
     * so that name conflicts are avoided when the same widget name is
     * present inside a Page, a Partial within a Page or a Prefab within a Page and so on.
     * E.g.:
     * if a page has a tabs widget with the name tabs1, a partial Partial1(inside container1) inclusion within which
     * there is a tabs with name tabs1 and a prefab MyPrefab inclusion with a tabs widget with the name tabs1,
     * getNestedPath will return tabs1, container1.Partial1.tabs1 and MyPrefab1.MyPrefab.tabs1 respectively.
     * @param viewParent
     * @param widgetName
     * @param currentOutput
     */
    getNestedPath(viewParent: any, widgetName: string, currentOutput?: string): any;
    /**
     * Decodes and parses the state information and returns the parsed state object
     * @param mode : optional parameter if the widget/variable uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    getStateInformation(mode: any): any;
    /**
     * Checks if the passed widget instance has any state information available or not
     * @param widget
     * @param mode : optional parameter if the widget uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    getWidgetState(widget: any, mode?: any): any;
    computeMode(widgetStateHandler: any): any;
    /**
     * Sets the passed value to the state information by using the passed widget instance
     * @param widget
     * @param value
     * @param mode : optional parameter if the widget uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    setWidgetState(widget: any, value: any, mode?: any): void;
    /**
     * Removes the passed widget’s state information from the State Object. If a key is passed, then only that
     * particular entry will be removed, not any other entries for that widget.
     * @param widget
     * @param key
     * @param mode : optional parameter if the widget uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    removeWidgetState(widget: any, key?: any, mode?: any): void;
    /**
     * Sets the passed value to the state information by using the passed variable name as key
     * @param variableName
     * @param value
     * @param mode : optional parameter if the variable uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    setStateVariable(variableName: any, value: any, mode?: any): void;
    /**
     * Checks if the passed variable name has any state information available in the url or not
     * @param variableName
     * @param mode : optional parameter if the variable uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    getStateVariable(variableName: string, mode?: any): any;
    /**
     * Removes the passed variable’s state information from the URL.
     * @param variableName
     * @param mode : optional parameter if the widget uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    removeStateVariable(variableName: any, mode?: any): void;
    /**
     * Sets the passed state information in the url by parsing the passed value and checking
     * its type. If its an array type, then the passed values will be pushed into an array and then set in the state
     * E.g.
     * Current state information is like :
     {
       "widget_state": {
           "Table1": {
               "selectedItem": [
                 {
                   "page": "1",
                   "index": "1"
                 }
               ],
           "pagination": "1"
         }
         }
     }
     * Input value will be like:
     {
       "selectedItem": [
         {
           "page": "1",
           "index": "2"
         }
       ]
     }

     * This parsing logic will convert it to the following
     {
       "widget_state": {
           "Table1": {
               "selectedItem": [
                 {
                   "page": "1",
                   "index": "1"
                 },
                 {
                   "page": "1",
                   "index": "2"
                 }
               ],
           "pagination": "1"
         }
         }
     }
     * Based on how the HISTORY_HANDLER is configured, the updated url will either replace the existing url or
     * push a new state in the url so that back button may track each update to the state.
     * @param stateParam
     * @param key
     * @param val
     * @param mode : optional parameter if the widget/variable uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    setStateParams(stateParam: string, key: string, val: any, mode?: any, widget?: any): void;
    /**
     * Removes the passed state information from the url
     * E.g.
     * Current state information is like :
     {
       "widget_state": {
           "Table1": {
               "selectedItem": [
                 {
                   "page": "1",
                   "index": "1"
                 },
                 {
                 "page": "2",
                 "index": "1"
                 }
               ],
           "pagination": "1"
         }
         }
     }
     * Input values will be like:
     subParam : 'selectedItem'

     * This method will convert it to the following
     {
       "widget_state": {
           "Table1": {
             "pagination": "1"
            }
         }
     }
     * @param stateParam
     * @param key
     * @param subParam
     * @param mode : optional parameter if the widget/variable uses a state handling mode(url, local storage, session storage)
     * other than the project level mode
     */
    removeStateParam(stateParam: any, key: any, subParam?: any, mode?: any, widget?: any): void;
    /**
     * Converts the State Information object into an encoded object when state handling mode is URL
     * so that a meaningful URL can be formed and the user can make changes easily to the URL.
     * E.g.
     * state information input will be like :
     {
         "widget-state": {
             "Table1": {
             "pagination": "3",
             "search":[
                        {
                            "field":"state",
                            "value":"NY",
                            "matchMode":"anywhereignorecase",
                            "type":"string"
                        }
                      ]
             }
         }
     },
     "CustomVariableSelectedItems": ["2", "3"]
     }


     * This method will convert it to the following
     ('widget-state'~('Table1'~('pagination'~'3'_'search'~!('field'~'state'_'value'~'NY'_'matchMode'~'anywhereignorecase'_'type'~'string')*))_'CustomVariableSelectedItems'~!'2'_'3'*)
     * @param jsonObj
     */
    private jsonToUri;
    /**
     * Decodes the encoded State Information object into a JSON object when state handling mode is URL
     * so that state information can be parsed and applied to the widgets.
     * E.g.
     * encoded state information input will be like :
     ('widget-state'~('Table1'~('pagination'~'3'_'search'~!('field'~'state'_'value'~'NY'_'matchMode'~'anywhereignorecase'_'type'~'string')*))_'CustomVariableSelectedItems'~!'2'_'3'*)


     * This method will convert it to the following
     {
         "widget-state": {
             "Table1": {
             "pagination": "3",
             "search":[
                        {
                            "field":"state",
                            "value":"NY",
                            "matchMode":"anywhereignorecase",
                            "type":"string"
                        }
                      ]
             }
         }
     },
     "CustomVariableSelectedItems": ["2", "3"]
     }
     * @param encodedObj
     */
    private uriToJson;
    static ɵfac: i0.ɵɵFactoryDeclaration<StatePersistence, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<StatePersistence>;
}
