define("@cardstack/identitymind/models/identitymind-verification", ["exports", "@cardstack/models/generated/identitymind-verification", "ember-cp-validations", "@cardstack/plugin-utils/environment"], function (exports, _identitymindVerification, _emberCpValidations, _environment) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });


  var Validations = (0, _emberCpValidations.buildValidations)({
    bfn: (0, _emberCpValidations.validator)('presence', true),
    bln: (0, _emberCpValidations.validator)('presence', true),
    tea: [(0, _emberCpValidations.validator)('presence', true), (0, _emberCpValidations.validator)('format', { type: 'email' })],
    dob: (0, _emberCpValidations.validator)('presence', true),
    sco: (0, _emberCpValidations.validator)('presence', true),
    bsn: (0, _emberCpValidations.validator)('presence', true),
    bc: (0, _emberCpValidations.validator)('presence', true),
    bco: (0, _emberCpValidations.validator)('presence', true),
    scanData: (0, _emberCpValidations.validator)('presence', true),
    faceImageData: (0, _emberCpValidations.validator)('presence', true)
  });

  exports.default = _identitymindVerification.default.extend(Validations, {
    ajax: Ember.inject.service(),

    uploadFormA: function uploadFormA(file, filename, token) {
      var formData = new FormData();
      formData.append('file', file, filename);

      return this.get('ajax').request(_environment.hubURL + "/identitymind/document-uploads", {
        type: 'POST',
        data: formData,
        processData: false,
        contentType: false,
        headers: { "Authorization": "Bearer " + token }
      });
    }
  });
});