"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _deprecationTestkitLog = _interopRequireDefault(require("../utils/deprecationTestkitLog"));
var badgeDriverFactory = _ref => {
  var {
    element,
    eventTrigger
  } = _ref;
  (0, _deprecationTestkitLog.default)('badgeTestkitFactory legacy testkit is deprecated and will be removed in next major release. Please use the BadgeTestkit unidriver testkit instead.');
  return {
    /** checks if element exists */
    exists: () => !!element,
    /** returns elements text */
    text: () => element.textContent,
    getType: () => element.getAttribute('data-type'),
    getSkin: () => element.getAttribute('data-skin'),
    getSize: () => element.getAttribute('data-size'),
    isUppercase: () => element.getAttribute('data-uppercase') === 'true',
    hasClickCursor: () => element.getAttribute('data-clickable') === 'true',
    click: () => eventTrigger.click(element)
  };
};
var _default = exports.default = badgeDriverFactory;
//# sourceMappingURL=Badge.driver.js.map