import { baseUniDriverFactory } from '../utils/test-utils/unidriver';
import { tooltipDriverFactory } from '../Tooltip/Tooltip.uni.driver';
import { dataHooks } from './StatusIndicator.constants';
export const statusIndicatorDriverFactory = (base, body) => {
    const tooltipSelector = `[data-hook="${dataHooks.tooltip}"]`;
    const tooltipDriver = () => tooltipDriverFactory(base.$(tooltipSelector), body);
    return {
        ...baseUniDriverFactory(base),
        /** Returns the type of the status oneOf(error, warning, success, loading) */
        getStatus: async () => (await base.attr('data-status')),
        /** Returns true if a message was provided */
        hasMessage: async () => await tooltipDriver().exists(),
        /** Returns the message text */
        getMessage: async () => await tooltipDriver().getTooltipText(),
    };
};
//# sourceMappingURL=StatusIndicator.uni.driver.js.map