export class ThemeEvents{static variantSelected="variant:selected";static variantUpdate="variant:update";static cartUpdate="cart:update";static cartError="cart:error";static mediaStartedPlaying="media:started-playing";static quantitySelectorUpdate="quantity-selector:update";static megaMenuHover="megaMenu:hover";static zoomMediaSelected="zoom-media:selected";static discountUpdate="discount:update";static FilterUpdate="filter:update"}export class VariantSelectedEvent extends Event{constructor(resource){super(ThemeEvents.variantSelected,{bubbles:!0}),this.detail={resource}}}export class VariantUpdateEvent extends Event{constructor(resource,sourceId,data){super(ThemeEvents.variantUpdate,{bubbles:!0}),this.detail={resource:resource||null,sourceId,data:{html:data.html,productId:data.productId,newProduct:data.newProduct}}}}export class CartAddEvent extends Event{constructor(resource,sourceId,data){super(CartAddEvent.eventName,{bubbles:!0}),this.detail={resource,sourceId,data:{...data}}}static eventName=ThemeEvents.cartUpdate}export class CartUpdateEvent extends Event{constructor(resource,sourceId,data){super(ThemeEvents.cartUpdate,{bubbles:!0}),this.detail={resource,sourceId,data:{...data}}}}export class CartErrorEvent extends Event{constructor(sourceId,message){super(ThemeEvents.cartError,{bubbles:!0}),this.detail={sourceId,data:{message}}}}export class QuantitySelectorUpdateEvent extends Event{constructor(quantity,cartLine){super(ThemeEvents.quantitySelectorUpdate,{bubbles:!0}),this.detail={quantity,cartLine}}}export class DiscountUpdateEvent extends Event{constructor(resource,sourceId){super(ThemeEvents.discountUpdate,{bubbles:!0}),this.detail={resource,sourceId}}}export class MediaStartedPlayingEvent extends Event{constructor(resource){super(ThemeEvents.mediaStartedPlaying,{bubbles:!0}),this.detail={resource}}}export class SlideshowSelectEvent extends Event{constructor(data){super(SlideshowSelectEvent.eventName,{bubbles:!0}),this.detail=data}detail;static eventName="slideshow:select"}export class ZoomMediaSelectedEvent extends Event{constructor(index){super(ThemeEvents.zoomMediaSelected,{bubbles:!0}),this.detail={index}}}export class MegaMenuHoverEvent extends Event{constructor(){super(ThemeEvents.megaMenuHover,{bubbles:!0})}}export class FilterUpdateEvent extends Event{constructor(queryParams){super(ThemeEvents.FilterUpdate,{bubbles:!0}),this.detail={queryParams}}shouldShowClearAll(){return[...this.detail.queryParams.entries()].filter(([key])=>key.startsWith("filter.")).length>0}}
//# sourceMappingURL=/s/files/1/0677/1399/0759/t/1/assets/events.js.map?v=1783128489
