<template>
  <i-form>
    <form-item>
      <div>
        <i-button
          type="primary"
          @click="joinRoom">Join</i-button>
        <i-button
          @click="declineInvitation">Decline</i-button>
      </div>
    </form-item>
  </i-form>
</template>

<script>
  export default {
  props: {
  currentRoomId: {
      type: String,
      default: null,
    },
  },
  methods: {
  joinRoom() {
      this.$matrix.client.joinRoom(this.currentRoomId, { syncRoom: true });
    },

    declineInvitation() {
      this.$matrix.client.leave(this.currentRoomId);
    },
  },
  };
</script>

<style>
</style>
