export interface CatalogEntry { id : number ; label : string ; tooltip : string ; kind : CatalogEntryKind ; } export class Collection implements CatalogEntry { public readonly label : string ; public readonly tooltip : string ; public readonly kind = CatalogEntryKind . Collection ; constructor ( public readonly id , name , description , public readonly domainIds ) { this . label = name ; this . tooltip = description ; } } export class Domain implements CatalogEntry { public readonly label : string ; public readonly tooltip : string ; public readonly kind = CatalogEntryKind . Domain ; constructor ( public id , name , description ) { this . label = name ; this . tooltip = description ; } } export class Problem implements CatalogEntry { public readonly label : string ; public readonly tooltip : string ; public readonly kind = CatalogEntryKind . Problem ; constructor ( public id , name , public domain_url , public problem_url ) { this . label = name ; this . tooltip = '' ; } } export enum CatalogEntryKind { Collection , Domain , Problem }