mirror of
https://github.com/thomasnordquist/MQTT-Explorer.git
synced 2026-09-14 10:34:36 +00:00
20 lines
386 B
TypeScript
20 lines
386 B
TypeScript
import { EventDispatcher } from '../../../events'
|
|
|
|
export class TopicViewModel {
|
|
private selected: boolean
|
|
public change = new EventDispatcher<void, TopicViewModel>()
|
|
|
|
public constructor() {
|
|
this.selected = false
|
|
}
|
|
|
|
public isSelected() {
|
|
return this.selected
|
|
}
|
|
|
|
public setSelected(selected: boolean) {
|
|
this.selected = selected
|
|
this.change.dispatch()
|
|
}
|
|
}
|