"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[18],{18:function(e,l,a){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0}),l.ProductOptionSwatch=void 0;const s=a(0),i=(a(1),a(2)),n=a(22),c=r(a(38)),{wrapperBubble:t,wrapperTab:d,wrapperBubbleNotAvailable:o,wrapperBubbleInsideColor:b,wrapperBubbleInsideColorSelect:u,wrapperBubbleSelected:p,wrapperBubbleLarge:w,wrapperBubbleMedium:C,wrapperBubbleXl:h,wrapperBubbleInsideChild:g,wrapperBubbleInside:m,wrapperBubbleBadge:B,wrapperBubbleBadgeSmall:v,wrapperBubbleBadgeMedium:x,wrapperBubbleSaleCircle:f}=c.default;a(32);const y=(0,s.jsxs)("svg",Object.assign({width:"37",height:"18",viewBox:"0 0 37 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[(0,s.jsx)("rect",{width:"37",height:"18",rx:"9",fill:"#E4632B"}),(0,s.jsx)("path",{d:"M7.172 13.156C6.34 13.156 5.644 12.952 5.084 12.544C4.532 12.136 4.156 11.544 3.956 10.768L5.324 10.372C5.476 10.876 5.692 11.248 5.972 11.488C6.252 11.72 6.652 11.836 7.172 11.836C7.66 11.836 8.052 11.732 8.348 11.524C8.652 11.316 8.804 11.02 8.804 10.636C8.804 10.332 8.684 10.08 8.444 9.88C8.204 9.68 7.776 9.528 7.16 9.424C6.176 9.24 5.436 8.948 4.94 8.548C4.444 8.148 4.196 7.6 4.196 6.904C4.196 6.424 4.32 5.996 4.568 5.62C4.824 5.244 5.176 4.952 5.624 4.744C6.072 4.528 6.584 4.42 7.16 4.42C7.928 4.42 8.564 4.62 9.068 5.02C9.572 5.42 9.916 5.984 10.1 6.712L8.732 7.096C8.612 6.64 8.428 6.3 8.18 6.076C7.94 5.852 7.6 5.74 7.16 5.74C6.704 5.74 6.34 5.84 6.068 6.04C5.796 6.24 5.66 6.528 5.66 6.904C5.66 7.216 5.796 7.452 6.068 7.612C6.348 7.772 6.8 7.916 7.424 8.044C8.4 8.236 9.116 8.54 9.572 8.956C10.036 9.364 10.268 9.924 10.268 10.636C10.268 11.132 10.132 11.572 9.86 11.956C9.588 12.34 9.216 12.636 8.744 12.844C8.272 13.052 7.748 13.156 7.172 13.156ZM16.8987 11.116H13.4667L12.7707 13H11.2707L14.4147 4.6H15.9507L19.0947 13H17.5947L16.8987 11.116ZM16.4067 9.796L15.1827 6.496L13.9587 9.796H16.4067ZM20.6924 4.6H22.1564V11.656H25.8284V13H20.6924V4.6ZM27.5205 4.6H32.8005V5.92H28.9845V8.128H32.2965V9.412H28.9845V11.68H32.8005V13H27.5205V4.6Z",fill:"white"})]})),k={triggerOnce:!0,threshold:1};l.ProductOptionSwatch=function({colorId:e,swatchClicked:l,isSelected:a,swatchStyle:r="bubble",available:c=!0,size:H="small",value:j,isInSelect:S=!1,swatch_src:_,swatch_hex:I,key:L="",swatchType:M,onSaleSwatchBadge:O="none",onSale:V=!1}){const[$]="undefined"!=typeof window?(0,n.useObserver)(k):[null];["disney-mickey-mouse","disney-minnie-mouse","disney-love-story","disney-polka-dots","pixar-woody","pixar-buzz-lightyear","pixar-aliens","disney-elsa","disney-olaf"].includes(e)&&(e=`${e}-full`);const z="centeredImage"===M?`background-color: ${I}; background-size: cover !important;`:`background-color: ${I}; background-image: url('${_}'); background-size: cover !important;`;return(0,s.jsx)("div",Object.assign({ref:$,className:(0,i.cx)("option-swatch nacelle no-select","bubble"===r?t:d,c?"available":o,"swatch-color__Color",a&&p),onClick:l},{children:"bubble"===r?(0,s.jsxs)("div",Object.assign({style:z,className:(0,i.cx)("centeredImage"===M&&m,`${S?u:"large"===H?w:"xl"===H?h:"md"===H?C:b}`,V&&"badgeAndCircle"===O&&f)},{children:[V&&("badgeAndCircle"===O||"badge"===O)&&(0,s.jsx)("div",Object.assign({className:(0,i.cx)(B,"md"===H&&x,"small"===H&&v)},{children:y})),"centeredImage"===M&&(0,s.jsx)("div",{style:`background-image: url('${_}');`,className:g})]})):(0,s.jsx)("span",{children:{value:j}})}),L)}}}]);