import { PopoverMenuUniDriver } from '@wix/design-system/dist/testkit/unidriver';
import { DisabledTooltipButtonUniDriver } from '../DisabledTooltip/DisabledTooltipButton.uni.driver';
export function CustomFieldPopoverUniDriver(base, body) {
    const customFieldPopoverDriverBase = () => base.$('[data-hook="custom-field-options"]');
    const customFieldPopoverDriver = () => PopoverMenuUniDriver(customFieldPopoverDriverBase(), body);
    const customFieldOptionsTrigger = () => 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