"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.badgeSelectPrivateUniDriverFactory = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _unidriver = require("../utils/test-utils/unidriver");
var _BadgeSelectUni = require("./BadgeSelect.uni.driver");
var _PopoverNextUni = require("../PopoverNext/PopoverNext.uni.driver");
var _BadgeUni = require("../Badge/Badge.uni.driver");
var DATA_ATTR = _interopRequireWildcard(require("./DataAttr"));
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var badgeSelectPrivateUniDriverFactory = (base, body) => {
  var popoverDriver = (0, _PopoverNextUni.popoverNextUniDriverFactory)(base, body);
  var badgeDriver = (0, _BadgeUni.badgeUniDriverFactory)((0, _unidriver.findByHook)(base, DATA_ATTR.DATA_BADGE));
  return _objectSpread(_objectSpread({}, (0, _BadgeSelectUni.badgeSelectUniDriverFactory)(base, body)), {}, {
    /** Performs a click outside the component */
    clickOutside: popoverDriver.clickOutside,
    /** Clicks on the badge */
    clickOnBadge: () => badgeDriver.click(),
    /** Whether the dropdown is shown */
    isDropdownShown: popoverDriver.isContentElementExists
  });
};
exports.badgeSelectPrivateUniDriverFactory = badgeSelectPrivateUniDriverFactory;
//# sourceMappingURL=BadgeSelect.private.uni.driver.js.map