<template>
  <div>
    <form novalidate @submit.prevent="performRegister">
      <md-card-content>

        <md-field>
          <label>Username</label>
          <md-input :disabled="processing"></md-input>
        </md-field>

        <md-field :md-toggle-password="false">
          <label>Password</label>
          <md-input type="password" :disabled="processing"></md-input>
        </md-field>

        <md-field :md-toggle-password="false">
          <label>Confirm password</label>
          <md-input :disabled="processing" type="password"></md-input>
        </md-field>

      </md-card-content>

      <md-card-actions>
        <md-progress-spinner :md-diameter="30" :md-stroke="3" md-mode="indeterminate" v-if="processing"
                             class="md-accent"></md-progress-spinner>
        <md-button type="submit" class="md-primary" :disabled="processing">Register</md-button>
      </md-card-actions>
    </form>
  </div>
</template>

<script>
export default {
  name: "Register",
  data() {
    return {
      processing: false
    }
  },
  methods: {
    performRegister() {
      this.processing = true;
    }
  }
}
</script>

<style scoped>

</style>