import type { IMenuGroupItem } from './IMenuGroupItem' ; import type { IMenuItem } from './IMenuItem' ; import { MenuItem } from './MenuItem' ; export class MenuGroupItem extends MenuItem implements IMenuGroupItem { items : IMenuItem [ ] ; readonly disabled : boolean ; get hidden ( ) : boolean { return this . items . length === 0 ; } constructor ( items = [ ] ) { super ( ) ; this . items = items ; this . disabled = false ; } add ( ... items ) { this . items . push ( ... items ) ; } addAfter ( index , ... items ) { this . items . splice ( index , 0 , ... items ) ; } }