"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[25],{42(t,i,e){e.d(i,{a:()=>u});var s=e(0),n=e(1),a=e(34),d=e(13),l=e(26),o=e(15),c=e(24),r=e(4);function u(t){const{product:i,selectedVariant:e,appearance:n,location:a,isBundle:d}=t,{pdpWishlistLoc:l}=(0,r.d)((t=>({pdpWishlistLoc:t.pdpWishlistLoc})));return(0,c.a)()?"pdp"===n&&l!==a?null:e?i.isPack||d||!e||e.parentId?null:(0,s.jsx)(p,Object.assign({},t,{selectedVariant:e})):null:null}function p({appearance:t,product:i,selectedVariant:e,disabled:c=!1,location:u}){var p;const{isMobile:h}=(0,r.d)((t=>({isMobile:t.isMobile}))),{toggleWishlistItem:b,wishlistItems:m,wishlistMode:v}=(0,a.g)(),w=(0,l.b)(i,e),I=(0,n.h)((()=>{const t=e.childProductId;return parseInt(t||i.id)}),[e.childProductId,i.id]),f=(0,n.h)((()=>parseInt(e.variantId)),[e.variantId]),g=(0,n.h)((()=>"undefined"!=typeof window?window.location.origin+w:w),[w]),k=(0,n.h)((()=>m.some((t=>t.variantId===f))),[f,m]),P=(0,n.h)((()=>m.some((t=>t.productId===I))),[I,m]),$=(0,n.h)((()=>{switch(v){case"variant":return k;case"product":return P;default:return!1}}),[v,k,P]),M=(0,n.a)((()=>{void 0!==f&&void 0!==I&&(document.activeElement instanceof HTMLElement&&document.activeElement.blur(),b({epi:f,empi:I,du:g}))}),[b,f,I,g]),[L,j]=(0,n.k)(!1);(0,n.g)((()=>{j(!0)}),[]);const B=null!==(p=e.productTitle)&&void 0!==p?p:i.title,E=L&&$,W=E?"Remove":"Add",x=E?"from":"to",C=(0,n.h)((()=>(0,o.b)(B,e.selectedOptions)),[B,e.selectedOptions]),O=C?`${W} ${C} ${x} wishlist`:`${W} ${x} wishlist`,V="pdp"===t?d.a.wishlistButtonPDP:d.a.wishlistButtonPLP,D="image"===u?h?d.a.pdpImageMobile:d.a.pdpImageDesktop:void 0,T=D?`${V} ${D}`:V;return(0,s.jsx)("button",{onClick:M,class:T,"aria-pressed":L&&$,disabled:c,"aria-label":O,children:(0,s.jsx)("div",{className:d.a.wishlistButtonIcon})})}},24(t,i,e){e.d(i,{a:()=>n,b:()=>a});var s=e(4);function n(){return(0,s.d)((t=>t.wishlistEnabled))}function a(){return(0,s.d)((t=>t.wishlistProvider))}}}]);