"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _Header = require("./Header.constants");
var _deprecationTestkitLog = _interopRequireDefault(require("../../../utils/deprecationTestkitLog"));
var headerDriverFactory = _ref => {
  var {
    element
  } = _ref;
  (0, _deprecationTestkitLog.default)('headerDriverFactory legacy testkit is deprecated and will be removed in next major release. Please use headerUniDriverFactory from Header.uni.driver instead.');
  var _title = () => element.querySelector("[data-hook=\"".concat(_Header.DATA_HOOKS.title, "\"]"));
  var _subtitle = () => element.querySelector("[data-hook=\"".concat(_Header.DATA_HOOKS.subtitle, "\"]"));
  return {
    exists: () => !!element,
    title: () => {
      var el = _title();
      return el && el.textContent;
    },
    subtitle: () => {
      var el = _subtitle();
      return el && el.textContent;
    }
  };
};
var _default = exports.default = headerDriverFactory;
//# sourceMappingURL=Header.driver.js.map