class Task extends EventTarget {
  constructor(data){
    super()
    this.data = data
  }

  get id(){
    return this.data.id
  }

  get done(){
    return this.data.done
  }

  set done(new_value){
    this.data.done = new_value
    this.dispatchEvent(new CustomEvent("change"))
  }

  get description(){
    return this.data.description
  }

  set description(new_value){
    this.data.description = new_value
    this.dispatchEvent(new CustomEvent("change"))
  }
}

export default Task