license import { ListKeyManager , ListKeyManagerOption } from './list-key-manager' ; /**
 * This is the interface for highlightable items (used by the ActiveDescendantKeyManager).
 * Each item must know how to style itself as active or inactive and whether or not it is
 * currently disabled.
 */ export interface Highlightable extends ListKeyManagerOption { /** Applies the styles for an active item to this item. */ setActiveStyles ( ) : void ; /** Applies the styles for an inactive item to this item. */ setInactiveStyles ( ) : void ; } export class ActiveDescendantKeyManager < T > extends ListKeyManager < Highlightable & T > { param index override setActiveItem ( index ) ; param item override setActiveItem ( item ) ; override setActiveItem ( index ) { if ( this . activeItem ) { this . activeItem . setInactiveStyles ( ) ; } super . setActiveItem ( index ) ; if ( this . activeItem ) { this . activeItem . setActiveStyles ( ) ; } } }