"use strict";exports.id=1917,exports.ids=[1917],exports.modules={21917:(e,t,i)=>{i.d(t,{m:()=>useViewItemListEvent});var r=i(16689),s=i(97358);let useViewItemListEvent=({products:e,title:t,page:n,pageSize:a})=>{let{currency:{code:m}}=(0,s.kP)(),o=(0,r.useCallback)(r=>{let s=e?.length?e:r?.products;s&&0!==s.length&&Promise.all([i.e(6393),i.e(2792)]).then(i.bind(i,66393)).then(({sendAnalyticsEvent:e})=>{e({name:"view_item_list",params:{item_list_name:t,item_list_id:t,items:s.map(({node:e},t)=>({item_id:e.isVariantOf.productGroupID,item_name:e.isVariantOf.name,item_brand:e.brand.name,item_variant:e.sku,price:e.offers.offers[0].price,index:n*a+t+1,discount:e.offers.offers[0].listPrice-e.offers.offers[0].price,currency:m,item_variant_name:e.name,product_reference_id:e.gtin}))}})})},[m,e,t,n,a]);return{sendViewItemListEvent:o}}}};