We use strictly necessary cookies to personalise your site experience. You can learn more here.
{ getProduct(e.detail); show() }" @keyup.window.escape="close(); setTimeout(() => product = null, 300)" @click.prevent="close(); setTimeout(() => product = null, 300)" x-ref="modal">
{
let idx = null;
product.variants.forEach((v, i) => {
if (v.featured_image.id == $event.detail) {
idx = i;
}
});
if (idx !== null) swiper.slideTo(idx, 0);
}" x-init="() => {
if (variants.length > 1) {
const images = product.variants.map(v => {
if (v.featured_image) {
return `
`;
}
})
appendSlides(images);
} else {
if (product.featured_image) {
appendSlides(`
`);
}
}
}">