import { LegendItem } from '../../common/legend' ; import { GlobalChartState } from '../chart_state' ; const EMPTY_LEGEND_LIST = [ ] ; internal export const getLegendItemsSelector = ( state ) : LegendItem [ ] => { if ( state . internalChartState ) { return state . internalChartState . getLegendItems ( state ) ; } return EMPTY_LEGEND_LIST ; } ;