import { baseUniDriverFactory } from '../utils/test-utils/unidriver';
import { tooltipDriverFactory } from '../Tooltip/Tooltip.uni.driver';
import { dataHooks } from './constants';
export const infoIconDriverFactory = (base, body) => {
    const getTooltip = () => base.$(`[data-hook*="${dataHooks.tooltip}"]`);
    return {
        ...baseUniDriverFactory(base),
        /** Hover on icon. */
        hover: async () => getTooltip().hover(),
        /** Get size. */
        getSize: async () => base.attr('data-size'),
        /** Get content as a text value. */
        getContent: async () => {
            const tooltipDriver = tooltipDriverFactory(getTooltip(), body);
            return tooltipDriver.getTooltipText();
        },
        /** Check if tooltip is open. */
        isTooltipOpen: async () => {
            const tooltipDriver = tooltipDriverFactory(getTooltip(), body);
            return await tooltipDriver.tooltipExists();
        },
    };
};
//# sourceMappingURL=InfoIcon.uni.driver.js.map