import { baseUniDriverFactory } from '../utils/test-utils/unidriver';
// Embla carousel doesn't duplicate slides like react-slick, so we can use simpler selectors
const slideSelector = '.embla__slide';
export const carouselUniDriverFactory = (base) => {
    return {
        ...baseUniDriverFactory(base),
        isLoading: async () => (await base.$$('[data-hook="loader"]').count()) > 0,
        getChildren: () => base.$$(slideSelector).map((child) => child),
        getImages: () => base
            .$$(slideSelector + ' [data-hook="carousel-img"]')
            .map((img) => img.attr('src')),
        clickPrevious: () => base.$('[data-hook="prev-button-element"]').click(),
        clickNext: () => base.$('[data-hook="next-button-element"]').click(),
    };
};
//# sourceMappingURL=Carousel.uni.driver.js.map