"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _testUtils = _interopRequireDefault(require("react-dom/test-utils"));
var buttonDriverFactory = _ref => {
  var {
    element
  } = _ref;
  return {
    exists: () => !!element,
    click: () => _testUtils.default.Simulate.click(element),
    focus: () => _testUtils.default.Simulate.focus(element),
    blur: () => _testUtils.default.Simulate.blur(element),
    mouseEnter: () => _testUtils.default.Simulate.mouseEnter(element),
    mouseLeave: () => _testUtils.default.Simulate.mouseLeave(element),
    getButtonTextContent: () => element.textContent,
    isButtonDisabled: () => element.getAttribute('aria-disabled') === 'true',
    isPrefixIconExists: () => element.innerHTML.indexOf('prefix') !== -1,
    isSuffixIconExists: () => element.innerHTML.indexOf('suffix') !== -1
  };
};

// For internal use only!
var _default = exports.default = buttonDriverFactory;
//# sourceMappingURL=Button.legacy.driver.js.map