"use strict";

exports.__esModule = true;
exports.default = void 0;
var filePickerDriverFactory = _ref => {
  var {
    element
  } = _ref;
  var error = element.querySelector("[data-hook=filePicker-error]");
  var input = element.querySelector("[data-hook=\"file-upload-input\"]");
  var subLabel = element.querySelector("[data-hook=\"sub-label\"]");
  var mainLabel = element.querySelector("[data-hook=\"main-label\"]");
  return {
    exists: () => !!element,
    /** fulfilled if element has an error  */
    hasError: () => !!error,
    /** returns FilePicker error message text  */
    errorMessage: () => error.textContent,
    /** returns FilePicker subLabel text  */
    getSubLabel: () => subLabel.textContent,
    /** returns FilePicker mainLabel text  */
    getMainLabel: () => mainLabel.textContent,
    /** returns FilePicker input name  */
    getName: () => input.name
  };
};
var _default = exports.default = filePickerDriverFactory;
//# sourceMappingURL=FilePicker.driver.js.map