import { PopoverMenuUniDriver, TooltipUniDriver, } from '@wix/design-system/dist/testkit/unidriver';
export const MoreActionsUniDriver = (base, body) => {
    const moreActionsPopoverDriver = (dataHook) => PopoverMenuUniDriver(base.$(`[data-hook="${dataHook}"]`), body);
    const getMoreActions = (dataHook = 'more-actions') => ({
        exists: () => moreActionsPopoverDriver(dataHook).exists(),
        /** Gets trigger element of more Actions */
        getTriggerElement: () => moreActionsPopoverDriver(dataHook).getTriggerElement('more-actions-popover-button'),
        /** Opens the more actions popover */
        open: () => moreActionsPopoverDriver(dataHook)
            .getTriggerElement('more-actions-popover-button')
            .click(),
        /** Indicates whether the more actions popover is open */
        isOpen: () => moreActionsPopoverDriver(dataHook).isMenuOpen(),
        /** Clicks at child by data-hook */
        clickAtChildByDataHook: (childDataHook) => moreActionsPopoverDriver(dataHook).clickAtChildByDataHook(childDataHook),
        /** Clicks at child by index */
        clickAtChildByIndex: (index) => moreActionsPopoverDriver(dataHook).clickAtChild(index),
        /** Gets content at index */
        childContentAt: (index) => moreActionsPopoverDriver(dataHook).itemContentAt(index),
        /** Gets children count */
        childrenCount: () => moreActionsPopoverDriver(dataHook).childrenCount(),
        getTooltip: () => {
            return TooltipUniDriver(base.$('[data-hook="more-actions-tooltip"]'), body);
        },
    });
    return {
        getMoreActions,
    };
};
//# sourceMappingURL=MoreActions.uni.driver.js.map