component LegacyModal {
  props {
    title = "Confirm"
    @event confirm = function
  }

  state open = false

  functions {
    function show() {
      open = true
    }

    function confirm() {
      $emit("confirm", { accepted: true })
    }
  }

  view {
    <button @click='show()'>Open</button>
    <button @click='confirm()'>Confirm</button>
  }
}
