'use strict' ; import type { StatesOptionsKey } from '../../Core/Series/StatesOptions' ; import type TreemapPointOptions from './TreemapPointOptions' ; import type TreemapSeries from './TreemapSeries' ; import DrawPointComposition from '../DrawPointComposition.js' ; import SeriesRegistry from '../../Core/Series/SeriesRegistry.js' ; const { series : { prototype : { pointClass : Point } } , seriesTypes : { pie : { prototype : { pointClass : PiePoint } } , scatter : { prototype : { pointClass : ScatterPoint } } } } = SeriesRegistry ; import U from '../../Core/Utilities.js' ; const { extend , isNumber , pick } = U ; class TreemapPoint extends ScatterPoint { public drillId ? : ( boolean | string ) ; public name : string = void 0 as any ; public node : TreemapSeries . NodeObject = void 0 as any ; public options : TreemapPointOptions = void 0 as any ; public parent ? : string ; public series : TreemapSeries = void 0 as any ; public sortIndex ? : number ; public value : ( number | null ) = void 0 as any ; public getClassName ( ) { let className = Point . prototype . getClassName . call ( this ) , series = this . series , options = series . options ; if ( this . node . level <= series . nodeMap [ series . rootNode ] . level ) { className += ' highcharts-above-level' ; } else if ( ! this . node . isLeaf && ! pick ( options . interactByLeaf , ! options . allowTraversingTree ) ) { className += ' highcharts-internal-node-interactive' ; } else if ( ! this . node . isLeaf ) { className += ' highcharts-internal-node' ; } return className ; } private function public isValid ( ) { return Boolean ( this . id || isNumber ( this . value ) ) ; } public setState ( state ) { Point . prototype . setState . call ( this , state ) ; if ( this . graphic ) { this . graphic . attr ( { zIndex : state === 'hover' ? 1 : 0 } ) ; } } public shouldDraw ( ) { return isNumber ( this . plotY ) && this . y !== null ; } } interface TreemapPoint extends DrawPointComposition . Composition { setVisible : typeof PiePoint . prototype . setVisible ; } extend ( TreemapPoint . prototype , { setVisible : PiePoint . prototype . setVisible } ) ; DrawPointComposition . compose ( TreemapPoint ) ; export default TreemapPoint ;