"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 messageBoxMarketerialLayoutDriverFactory = _ref => {
  var {
    element
  } = _ref;
  var primaryButton = () => element.querySelector('[data-hook="primary-button"]');
  var primaryButtonNode = () => element.querySelector('[data-hook="primary-button-node"]');
  var secondaryButton = () => element.querySelector('[data-hook="secondary-button"]');
  var closeButton = () => element.querySelector('[data-hook="close-button"]');
  return {
    exists: () => !!element,
    getPrimaryButtonText: () => primaryButton().textContent,
    getPrimaryButton: primaryButton,
    getPrimaryButtonNode: primaryButtonNode,
    getSecondaryButtonText: () => secondaryButton().textContent,
    getSecondaryButton: secondaryButton,
    getHeaderCloseButton: closeButton,
    clickOnPrimaryButton: () => _testUtils.default.Simulate.click(primaryButton()),
    clickOnSecondaryButton: () => _testUtils.default.Simulate.click(secondaryButton()),
    closeMessageBox: () => _testUtils.default.Simulate.click(closeButton()),
    getTitle: () => element.querySelector('[data-hook="message-box-title"]').textContent,
    getContentBySelector: selector => element.querySelector(selector),
    getImageSrc: () => element.querySelector('[data-hook="header-image"]').src
  };
};
var _default = exports.default = messageBoxMarketerialLayoutDriverFactory;
//# sourceMappingURL=MessageBoxMarketerialLayout.driver.js.map