export class PropGroupCache { static states : Map < string , Map < string , boolean > > = new Map < string , Map < string , boolean > > ( ) ; static scrollLevels : Map < string , number > = new Map < string , number > ( ) ; static getCollapseState ( nodeType , groupName , defaultValue ) { const states = PropGroupCache . states ; if ( ! states . has ( nodeType ) ) return defaultValue ; const nodeStates = states . get ( nodeType ) ; if ( ! nodeStates . has ( groupName ) ) return defaultValue ; return nodeStates . get ( groupName ) ; } static setCollapseState ( nodeType , groupName , val ) { const states = PropGroupCache . states ; let nodeStates = null ; if ( states . has ( nodeType ) ) nodeStates = states . get ( nodeType ) ; else nodeStates = new Map < string , boolean > ( ) ; nodeStates . set ( groupName , val ) ; states . set ( nodeType , nodeStates ) ; } static setScrollLevel ( nodeName , level ) { PropGroupCache . scrollLevels . set ( nodeName , level ) ; } static getScrollLevel ( nodeName , defaultLevel ) { if ( PropGroupCache . scrollLevels . has ( nodeName ) ) return PropGroupCache . scrollLevels . get ( nodeName ) ; return defaultLevel ; } }