import { TextButtonUniDriver, TooltipUniDriver, PopoverMenuUniDriver, ButtonUniDriver, } from '@wix/design-system/dist/testkit/unidriver';
import { baseUniDriverFactory } from '../../unidriver';
export function MultiBulkActionToolbarUniDriver(base, body) {
    const button = (dataHook = 'bulk-action-button') => ButtonUniDriver(base.$(`[data-hook="${dataHook}"]`), body);
    const popover = (dataHook) => PopoverMenuUniDriver(base.$(`[data-hook="${dataHook}"]`), body);
    const tooltip = (dataHook = 'bulk-action-button') => TooltipUniDriver(base.$(`[data-hook="${dataHook}-tooltip"]`), body);
    const selectAll = () => TextButtonUniDriver(base.$(`[data-hook="select-all"]`), body);
    return {
        ...baseUniDriverFactory(base),
        getButton: (dataHook) => button(dataHook),
        clickButton: (dataHook) => button(dataHook).click(),
        isButtonExists: (dataHook) => button(dataHook).exists(),
        isButtonDisabled: (dataHook) => button(dataHook).isButtonDisabled(),
        getButtonTextContent: (dataHook) => button(dataHook).getButtonTextContent(),
        getPopover: (dataHook) => popover(dataHook),
        isPopoverExists: (dataHook) => popover(dataHook).exists(),
        openMoreActionPopover: () => PopoverMenuUniDriver(base.$(`[data-hook="more-actions-popover"]`), body)
            .getTriggerElement('more-actions')
            .click(),
        getMoreActionsPopoverItemAt: (index) => PopoverMenuUniDriver(base.$(`[data-hook="more-actions-popover"]`), body).itemContentAt(index),
        clickMoreActionsPopoverItemAt: (index) => PopoverMenuUniDriver(base.$(`[data-hook="more-actions-popover"]`), body).clickAtChild(index),
        clickMoreActionsPopoverItem: (dataHook) => PopoverMenuUniDriver(base.$(`[data-hook="more-actions-popover"]`), body).clickAtChildByDataHook(dataHook),
        getMoreActionsItemsCount: () => PopoverMenuUniDriver(base.$(`[data-hook="more-actions-popover"]`), body).childrenCount(),
        isMoreActionsOpen: () => PopoverMenuUniDriver(base.$(`[data-hook="more-actions-popover"]`), body).isMenuOpen(),
        selectAll: () => selectAll().click(),
        selectAllText: () => selectAll().getButtonTextContent(),
        isTooltipExist: (dataHook) => tooltip(dataHook).exists(),
        isTooltipVisible: (dataHook) => tooltip(dataHook).tooltipExists(),
        getTooltipText: (dataHook) => tooltip(dataHook).getTooltipText(),
        clickOutsideTooltip: (dataHook) => tooltip(dataHook).clickOutside(),
        mouseEnterTooltip: (dataHook) => tooltip(dataHook).mouseEnter(),
        mouseLeaveTooltip: (dataHook) => tooltip(dataHook).mouseLeave(),
        getSelectedCountText: () => base.$('[data-hook="selected-count"]').text(),
    };
}
//# sourceMappingURL=MultiBulkActionToolbar.uni.driver.js.map