import { IScript } from '@/domain/IScript' ; import { ICategory } from '@/domain/ICategory' ; import { IEventSource } from '@/infrastructure/Events/IEventSource' ; import { SelectedScript } from './SelectedScript' ; export interface IReadOnlyUserSelection { readonly changed : IEventSource < ReadonlyArray < SelectedScript > > ; readonly selectedScripts : ReadonlyArray < SelectedScript > ; isSelected ( scriptId ) : boolean ; areAllSelected ( category ) : boolean ; isAnySelected ( category ) : boolean ; } export interface IUserSelection extends IReadOnlyUserSelection { removeAllInCategory ( categoryId ) : void ; addOrUpdateAllInCategory ( categoryId , revert ) : void ; addSelectedScript ( scriptId , revert ) : void ; addOrUpdateSelectedScript ( scriptId , revert ) : void ; removeSelectedScript ( scriptId ) : void ; selectOnly ( scripts ) : void ; selectAll ( ) : void ; deselectAll ( ) : void ; }