import { tooltipLegacyDriverFactory } from '../Tooltip/Tooltip.driver';
import { dataHooks } from './constants';
const infoIconDriverFactory = ({ element, eventTrigger }) => {
    const getTooltip = () => tooltipLegacyDriverFactory({
        element: element.querySelector(`[data-hook="${dataHooks.tooltip}"]`),
        eventTrigger,
    });
    return {
        /** returns whether element is rendered */
        exists: () => !!element,
        /** returns element **/
        element: () => element,
        /** Hover on icon. */
        hover: () => getTooltip().mouseEnter(),
        /** Get size. */
        getSize: () => element.getAttribute('data-size'),
        /** Get content as a tooltip text value. */
        getContent: () => getTooltip().getTooltipText(),
    };
};
export default infoIconDriverFactory;
//# sourceMappingURL=InfoIcon.driver.js.map