"use strict";

exports.__esModule = true;
exports.CustomFieldPopoverUniDriver = CustomFieldPopoverUniDriver;
var _unidriver = require("@wix/design-system/dist/testkit/unidriver");
var _DisabledTooltipButtonUni = require("../DisabledTooltip/DisabledTooltipButton.uni.driver");
function CustomFieldPopoverUniDriver(base, body) {
  const customFieldPopoverDriverBase = () => base.$('[data-hook="custom-field-options"]');
  const customFieldPopoverDriver = () => (0, _unidriver.PopoverMenuUniDriver)(customFieldPopoverDriverBase(), body);
  const customFieldOptionsTrigger = () => (0, _DisabledTooltipButtonUni.DisabledTooltipButtonUniDriver)(base, body, {
    dataHook: 'custom-field-options-icon-button'
  });
  const getCustomFieldOptionsAt = () => {
    return {
      open: () => customFieldOptionsTrigger().click(),
      clickEdit: () => customFieldPopoverDriver().clickAtChildByDataHook('custom-field-options-edit'),
      clickArchive: () => customFieldPopoverDriver().clickAtChildByDataHook('custom-field-options-archive')
    };
  };
  return {
    exists: () => customFieldPopoverDriverBase().exists(),
    isDisabled: () => customFieldOptionsTrigger().isButtonDisabled(),
    getTooltipText: () => customFieldOptionsTrigger().getTooltipText(),
    getCustomFieldOptionsAt
  };
}
//# sourceMappingURL=CustomFieldPopover.uni.driver.js.map