<template>
  <div class="form">
    <div id="sendmessage">Your details has been sent. Thank you!</div>
    <div id="errormessage"></div>
    <form action="" method="post" role="form" class="contactForm">
      <div class="form-row">
        <div class="form-group col-md-6">
          <input
            type="text"
            name="bank"
            class="form-control"
            id="bank"
            placeholder="Bank"
            data-rule="minlen:4"
            data-msg="Please enter bank"
          />
          <div class="validation"></div>
        </div>
        <div class="form-group col-md-6">
          <input
            type="text"
            class="form-control"
            name="acc-nr"
            id="acc-nr"
            placeholder="Account Number"
            data-msg="Please enter account number"
          />
          <div class="validation"></div>
        </div>
        <div class="form-group col-md-6">
          <input
            type="text"
            name="holder"
            class="form-control"
            id="holder"
            placeholder="Account Holder"
            data-rule="minlen:4"
            data-msg="Please enter account holder"
          />
          <div class="validation"></div>
        </div>
        <div class="text-center col-3">
          <button @click="SubmitData()" class="btn-solid-blue">SAVE</button>
        </div>
        <div class="text-center col-3">
          <button @click="Close()" class="btn-solid-blue">CLOSE</button>
        </div>
      </div>
    </form>
  </div>
</template>

<script>
/* eslint-disable */
import propField from "../property/propertyFieldEditor.vue";

export default {
  name: "BankAccount",
  components: {
    propField
  },
  props: {
    bank: {
      bank: undefined,
      accNumber: undefined,
      accHolder: undefined
    }
  },
  methods: {
    UpdateValue(item) {
      if (item.fieldName) {
        if (item.fieldName === "bank") {
          this.bank.bank = item.value;
        }
        if (item.fieldName === "accNumber") {
          this.bank.accNumber = item.value;
        }
        if (item.fieldName === "accHolder") {
          this.bank.accHolder = item.value;
        }
      }
    }
  }
};
</script>

<style lang="scss" scoped></style>
