import { baseUniDriverFactory } from '../utils/test-utils/unidriver';
import { dataHooks } from './constants';
import { dividerDriverFactory } from '../Divider/Divider.uni.driver';
import { closeButtonDriverFactory } from '../CloseButton/CloseButton.uni.driver';
import { headingUniDriverFactory } from '../Heading/Heading.uni.driver';
import { infoIconDriverFactory } from '../InfoIcon/InfoIcon.uni.driver';
import { tooltipDriverFactory } from '../Tooltip/Tooltip.uni.driver';
export const sidePanelDriverFactory = (base, body) => {
    const headerTitle = headingUniDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderTitle}"]`));
    const headerSubtitle = headingUniDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderSubtitle}"]`));
    const headerTitleInfoIcon = infoIconDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderTitleInfoIcon}"]`), body);
    const headerDividerDriver = dividerDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderDivider}"]`));
    const footerDividerDriver = dividerDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderDivider}"]`));
    const closeButtonDriver = closeButtonDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderCloseButton}"]`));
    const helpButtonDriver = closeButtonDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderHelpButton}"]`));
    const headerPrefixDriver = base.$(`[data-hook="${dataHooks.sidePanelHeaderPrefix}"]`);
    const headerSuffixDriver = base.$(`[data-hook="${dataHooks.sidePanelHeaderSuffix}"]`);
    const contentDriver = base.$(`[data-hook="${dataHooks.sidePanelContent}"]`);
    const backButtonDriver = closeButtonDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderBackButton}"]`));
    const backButtonTooltipDriver = tooltipDriverFactory(base.$(`[data-hook="${dataHooks.sidePanelHeaderBackButtonTooltip}"]`), body);
    return {
        ...baseUniDriverFactory(base),
        /** Click help button */
        clickHelp: () => helpButtonDriver.click(),
        /** Click close button */
        clickClose: () => closeButtonDriver.click(),
        /** Click back button */
        clickBack: () => backButtonDriver.click(),
        /** Get help button aria-label */
        getHelpButtonAriaLabel: () => helpButtonDriver.getAriaLabel(),
        /** Get close button aria-label */
        getCloseButtonAriaLabel: () => closeButtonDriver.getAriaLabel(),
        /** Get back button aria-label */
        getBackButtonAriaLabel: () => backButtonDriver.getAriaLabel(),
        /** Get title text */
        getTitleText: () => headerTitle.getText(),
        /** Get Prefix element */
        getPrefix: () => headerPrefixDriver.getNative(),
        /** Get Suffix element */
        getSuffix: () => headerSuffixDriver.getNative(),
        /** Get Content Element */
        getContent: () => contentDriver.getNative(),
        /** Get subtitle text */
        getSubtitleText: () => headerSubtitle.getText(),
        /** Get tooltip text */
        getTooltipContent: () => headerTitleInfoIcon.getContent(),
        /** Get back button tooltip content */
        getBackButtonTooltipContent: () => backButtonTooltipDriver.getTooltipText(),
        /** Check if divider exists */
        isHeaderDividerExists: () => headerDividerDriver.exists(),
        /** Check if close button exists */
        isCloseButtonExists: () => closeButtonDriver.exists(),
        /** Check if help button exists */
        isHelpButtonExists: () => helpButtonDriver.exists(),
        /** Check if divider exists */
        isFooterDividerExists: () => footerDividerDriver.exists(),
        /** Check if back button exists*/
        isBackButtonExists: () => backButtonDriver.exists(),
    };
};
//# sourceMappingURL=SidePanel.uni.driver.js.map