const moment = require("moment") const {postApi} = require("../../../../../rpdata/api/Post") module.exports = class { onCreate(input) { this.state = { error: null, clicked: false, timestamp: moment(input.post.time).format("YYYY-MM-DD HH:mm:ss") } } change(key, ev) { this.state.values[key] = ev.target.value } open() { } close() { this.emit("close") } doIt() { if (this.state.clicked) { return } this.state.clicked = true this.emit("remove") this.emit("close") } }