"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[24],{216:function(e,s,t){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0}),s.ColorSelect=void 0;const a=t(0),c=(t(1),t(3)),r=t(2),n=t(18),o=l(t(71)),{wrapper:i,wrapperSwatches:d}=o.default;s.ColorSelect=function({variants:e,currentValue:s,onColorSelect:t}){const[l,o]=(0,c.useState)(s);return(0,c.useEffect)((()=>{o(s)}),[s]),(0,a.jsx)("div",Object.assign({className:i},{children:(0,a.jsx)("div",Object.assign({className:(0,r.cx)(d,"columns is-marginless is-multiline nacelle")},{children:e.map((e=>(0,a.jsx)(n.ProductOptionSwatch,{swatch_hex:e.colorData.swatch_hex,swatch_src:e.colorData.swatch_src,colorId:e.colorId,isSelected:e.colorId===l,isInSelect:!0,swatchClicked:()=>{o(e.colorId),t(e)}})))}))}))}},81:function(e,s,t){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0}),s.BundleBlendjetColorSelector=void 0;const a=t(0),c=t(3),r=t(2),n=t(13),o=t(4),i=t(216),d=l(t(72)),u=t(6),{wrapper:p,wrapperImage:j,wrapperImageIcon:h,wrapperSelect:m,wrapperSelectTitle:v,wrapperSelectTitleText:x,wrapperSelectTitleVariant:f,wrapperSelectColors:w,wrapperCentered:S,overlay:g}=d.default;s.BundleBlendjetColorSelector=({openColorDropdown:e,setColorDropdown:s,selectedVariant:t,setSelectedVariant:l,blendjet2:d,centered:C=!1})=>{var b;const{variants:_}=d,k=_.map((e=>({image:e.image,sku:e.sku}))),[O,I]=(0,c.useState)(k.find((e=>e.sku===t.sku)));return(0,u.useEffect)((()=>{I(k.find((e=>e.sku===t.sku)))}),[t]),e?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",Object.assign({className:(0,r.cx)(p,C&&S)},{children:[(0,a.jsxs)("div",Object.assign({className:j},{children:[(0,a.jsx)("div",Object.assign({className:h,onClick:()=>s(!1)},{children:(0,a.jsx)(o.Icons.CloseIconColorSelector,{})})),(0,a.jsx)("img",Object.assign({},null!==(b=null==O?void 0:O.image)&&void 0!==b?b:{src:"",alt:""}))]})),(0,a.jsxs)("div",Object.assign({className:m},{children:[(0,a.jsxs)("div",Object.assign({className:v},{children:[(0,a.jsx)("h6",Object.assign({className:x},{children:"color:"})),(0,a.jsx)("h6",Object.assign({className:(0,r.cx)(f,"no-translate")},{children:t.title}))]})),(0,a.jsx)("div",Object.assign({className:w},{children:(0,a.jsx)(i.ColorSelect,{currentValue:t.colorId,variants:_,onColorSelect:e=>{l(e),I(k.find((s=>s.sku===e.sku)))}})})),(0,a.jsx)(n.AddToCartButton,{cartMessage:"Save selection",onClick:()=>{s(!1)}})]}))]})),(0,a.jsx)("div",{className:g})]}):null}}}]);