import { mapGetters } from 'vuex'
export default function(data) {
  for (let i in data['bank_data'][0]['fields']) {
    if (data['bank_data'][0]['fields'][i]['label'] === 'A/C Holder Name') {
      data['bank_data'][0]['fields'][i]['readonly'] = true
    }
  }

  if (data['bank_data'].length > 1 && data['bank_data'][1]['fields'] !== undefined) {
    for (let k in data['bank_data'][1]['fields']) {
      if (data['bank_data'][1]['fields'][k]['label'] === 'Card Holder Name') {
        data['bank_data'][1]['fields'][k]['readonly'] = true
        data['bank_data'][1]['fields'][k]['autofill'] = 'details.name'
      }
    }
  }
  return data
}
