import { baseUniDriverFactory } from '../utils/test-utils/unidriver';
import { DATA_HOOKS } from './constants';
export const carouselWIPUniDriverFactory = (base) => {
    return {
        ...baseUniDriverFactory(base),
        isLoading: async () => (await base.$$(`[data-hook="${DATA_HOOKS.loader}"]`).count()) > 0,
        children: base.$$(`[data-hook="${DATA_HOOKS.child}"]`),
        getChildren: () => base
            .$$(`[data-hook="${DATA_HOOKS.child}"]`)
            .map(child => Promise.resolve(child)),
        getImages: () => base
            .$$(`[data-hook="${DATA_HOOKS.carouselImage}"]`)
            .map((img) => img.attr('src')),
        clickPrevious: () => base.$(`[data-hook="${DATA_HOOKS.prevButton}"]`).click(),
        clickNext: () => base.$(`[data-hook="${DATA_HOOKS.nextButton}"]`).click(),
    };
};
//# sourceMappingURL=CarouselWIP.uni.driver.js.map