module.exports = class { onCreate(input) { this.state = { modal: null, removed: false, } } updateChapter(data) { this.emit("edit", data) } removeChapter() { this.state.removed = true this.emit("remove") } open(modal) { this.state.modal = modal } close() { this.state.modal = null } }