"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1057],{27564:function(e,n,t){t.d(n,{t:function(){return z}});var o,r,i,l,c,a,d,u,s,p,v,h,g,y,x,f,m=t(7328),b=t(2784),O=t(48840),S=t(81292),w=t(87330),D=t(52322),C=O.zo.div(o||(o=(0,m.Z)(["\n display: flex;\n ","\n"])),function(e){return(0,S.sD)(e.priceDirection,function(n){return e.isSticky||e.showProductSummaryPriceOnSingleLine?"\n flex-direction: column;\n align-items: flex-start;\n ":"\n gap: ".concat((0,O.W0)(1),";\n flex-direction: ").concat(n,";\n align-items: ").concat(n===O.Nm.ROW?"center":"flex-start",";\n ")})}),P=O.zo.div(r||(r=(0,m.Z)(["\n display: flex;\n gap: ",";\n ","\n"])),(0,O.W0)(1),function(e){return(0,S.sD)(e.priceDirection,function(n){return"\n flex-direction: ".concat(e.showProductSummaryPriceOnSingleLine?"row-reverse":n,";\n align-items: ").concat(n===O.Nm.ROW?"center":"flex-start",";\n ")})}),j=O.zo.div(i||(i=(0,m.Z)(["\n display: flex;\n gap: ",";\n ","\n"])),(0,O.W0)(1),function(e){return(0,S.sD)(e.priceDirection,function(e){return"\n flex-direction: ".concat(e,";\n align-items: ").concat(e===O.Nm.ROW?"center":"flex-start",";\n ")})}),k=O.zo.div(l||(l=(0,m.Z)(["\n margin: "," 0;\n ","\n"])),(0,O.W0)(2),function(e){return e.discountMessageStyle?(0,O.iv)(c||(c=(0,m.Z)(["\n ",";\n color: ",";\n text-decoration: ",";\n "])),(0,w.xv)(e.discountMessageStyle.entry,e.discountMessageStyle.style),e.discountMessageStyle.textColor,e.discountMessageStyle.textDecoration):(0,O.iv)(a||(a=(0,m.Z)(["\n ",";\n color: ",";\n "])),(0,w.xv)("bodyText","default"),function(e){return e.theme.colors.error.base})}),W=O.zo.div(d||(d=(0,m.Z)(["\n ","\n ","\n ","\n order: ",";\n"])),function(e){return(0,S.sD)(e.priceDirection,function(e){return e===O.Nm.ROW&&"order: 2;"})},function(e){return e.rrpStyle?(0,O.iv)(u||(u=(0,m.Z)(["\n ",";\n color: ",";\n "])),(0,w.xv)(e.rrpStyle.entry,e.rrpStyle.style),e.rrpStyle.textColor):(0,O.iv)(s||(s=(0,m.Z)(["\n ",";\n color: ",";\n "])),(0,w.xv)("bodyText","default"),function(e){return e.theme.colors.palette.greys.dark})},function(e){return e.background&&"\n background-color: ".concat(e.background,"; \n padding: ").concat((0,O.W0)(.25)," ").concat((0,O.W0)(1),"\n ")},function(e){return e.order||0}),T=O.zo.span(p||(p=(0,m.Z)(["\n ","\n"])),function(e){return e.rrpStyle&&(0,O.iv)(v||(v=(0,m.Z)(["\n text-decoration: ",";\n "])),e.rrpStyle.textDecoration)}),R=O.zo.span(h||(h=(0,m.Z)(["\n ","\n ","\n ","\n"])),function(e){return(0,S.sD)(e.priceDirection,function(e){return e===O.Nm.ROW&&"order: 3;"})},function(e){return e.savingStyle?(0,O.iv)(g||(g=(0,m.Z)(["\n ",";\n color: ",";\n text-decoration: ",";\n "])),(0,w.xv)(e.savingStyle.entry,e.savingStyle.style),e.savingStyle.textColor,e.savingStyle.textDecoration):(0,O.iv)(y||(y=(0,m.Z)(["\n ",";\n color: ",";\n "])),(0,w.xv)("bodyText","default"),function(e){return e.theme.colors.error.base})},function(e){return e.background&&"\n background-color: ".concat(e.background,";\n padding: ").concat((0,O.W0)(.25)," ").concat((0,O.W0)(1),"\n ")}),N=O.zo.span(x||(x=(0,m.Z)(["\n ","\n\n order: ",";\n\n ","\n ","\n"])),function(e){return(0,S.sD)(e.priceDirection,function(e){return e===O.Nm.ROW&&"order: 1; flex-shrink: 0;"})},function(e){return e.order||0},function(e){var n,t,o,r,i;return(0,O.iv)(f||(f=(0,m.Z)(["\n ",";\n text-decoration: ",";\n ","\n "])),(0,w.xv)((null===(n=e.textStyle)||void 0===n?void 0:n.entry)||"large2",(null===(t=e.textStyle)||void 0===t?void 0:t.style)||"alternate"),(null===(o=e.textStyle)||void 0===o?void 0:o.textDecoration)||"none",null!==(r=e.textStyle)&&void 0!==r&&r.textColor?"color: ".concat(null===(i=e.textStyle)||void 0===i?void 0:i.textColor,";"):"")},function(e){return e.background&&"\n background-color: ".concat(e.background,";\n padding: ").concat((0,O.W0)(.25)," ").concat((0,O.W0)(1),"\n ")}),A=function(e,n,t,o,r,i,l,c){var a,d,u,s=(!e||e.show)&&n&&!t;return(0,D.jsx)(b.Fragment,{children:s&&(0,D.jsxs)(R,{"data-testid":"product-price-save",priceDirection:o||[O.Nm.ROW],savingStyle:(null==r||null===(d=r.savings)||void 0===d?void 0:d.textStyle)||(null==e?void 0:e.textStyle),background:null==r||null===(u=r.savings)||void 0===u?void 0:u.background,children:[(null==i?void 0:i.saveLabel)&&"".concat(i.saveLabel,": "),n,(a=null==i?void 0:i.offLabel,(null==l?void 0:l.show)&&c&&" (".concat(c,"% ").concat(a||"",")"))]})})},z=function(e){var n,t,o,r,i,l,c,a,d,u,s,p,v=e.pricing.saving,h=b.useMemo(function(){var n=parseFloat(e.pricing.price.replace(/[^0-9\.,]+/g,"")),t=parseFloat(e.pricing.rrp.replace(/[^0-9\.,]+/g,""));return n===t||n>t||isNaN(n)||isNaN(t)?null:((t-n)/t*100).toFixed()},[e.pricing]);return(0,D.jsxs)(C,{"data-testid":"product-price-container",priceDirection:e.priceDirection||[O.Nm.ROW],isSticky:e.isSticky,showProductSummaryPriceOnSingleLine:e.showProductSummaryPriceOnSingleLine,children:[(0,D.jsxs)(P,{priceDirection:e.priceDirection||[O.Nm.ROW],showProductSummaryPriceOnSingleLine:e.showProductSummaryPriceOnSingleLine,children:[(n=e.hasFromPrice,t=e.pricing,o=e.priceDirection,r=e.priceTheme,i=e.i18nText,l=e.displayRRPText,(0,D.jsx)(b.Fragment,{children:v&&!n&&t.rrp&&(0,D.jsxs)(W,{"data-testid":"product-rrp-container",priceDirection:o||[O.Nm.ROW],rrpStyle:null==r?void 0:r.rrp.textStyle,background:null==r?void 0:r.rrp.background,order:null==r?void 0:r.rrp.order,children:[l&&(null==i?void 0:i.rrpLabel)&&"".concat(i.rrpLabel,": "),(0,D.jsx)(T,{"data-testid":"product-price-rrp",rrpStyle:null==r?void 0:r.rrp.textStyle,children:t.rrp})]})})),(0,D.jsxs)(N,{"data-testid":"product-price-price",order:null===(c=e.priceTheme)||void 0===c?void 0:c.price.order,priceDirection:e.priceDirection||[O.Nm.ROW],textStyle:v&&!e.hasFromPrice?null===(a=e.priceTheme)||void 0===a?void 0:a.priceWithRRP.textStyle:null===(d=e.priceTheme)||void 0===d?void 0:d.price.textStyle,children:[e.hasFromPrice&&(null===(u=e.i18nText)||void 0===u?void 0:u.fromLabel)&&"".concat(e.i18nText.fromLabel,": "),e.pricing.price]})]}),(0,D.jsxs)(j,{priceDirection:e.priceDirection||[O.Nm.ROW],children:[A(e.savings,v,e.hasFromPrice,e.priceDirection,e.priceTheme,e.i18nText,e.savingsPercentage,h),(null===(s=e.discountMessageProps)||void 0===s?void 0:s.text)&&(0,D.jsx)(k,{discountMessageStyle:null===(p=e.discountMessageProps)||void 0===p?void 0:p.textStyle,children:e.discountMessageProps.text})]})]})}},8729:function(e,n,t){t.d(n,{A:function(){return z}});var o,r,i=t(95235),l=t(2784),c=t(69363),a=t(15792),d=t(16048),u=t(31477),s=t(17258),p=t(78930),v=t(93479),h=t(31275),g=t(73557),y=t(7328),x=t(48840),f=(0,x.zo)(d.a)(r||(r=(0,y.Z)(["\n width: 100%;\n"]))),m=t(52322);function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function O(e){for(var n=1;n0||e.index>=0,selected:null===(t=e.selectedOptions)||void 0===t?void 0:t[e.option.key],maxDropdownHeight:e.maxDropdownHeight||"146px",width:e.dropdownWidth},e.option.label===S.Size&&{customErrorMessage:e.customErrorMessage}),{},{hideAsterixOnPDP:e.hideAsterixOnPDP}))},C=function(e){var n,t,o,r,i=e.choicesWithColour,l=(0,a.Fg)();return i.length>0&&!e.forceDropDowns&&(null===(n=null===(t=e.swatch)||void 0===t?void 0:t.show)||void 0===n||n)?(0,m.jsx)(s.m,{shape:null!==(o=e.swatchShape)&&void 0!==o?o:g.M.SQUARE,colours:i,selectedColour:null===(r=e.selectedOptions)||void 0===r?void 0:r[e.option.key],onColourChange:function(n){var t;e.onOptionChange(e.option.key,n),null===(t=e.onColourSwatchClick)||void 0===t||t.call(e)},i18nText:e.i18nText.swatch,showOnlyTwoRows:e.showOnlyTwoRows,displayColoursAsTextOnly:e.displayColoursAsTextOnly,size:l.patterns.productBlock.components.swatch.productOptionSize,noSwatchBorder:l.patterns.productBlock.components.swatch.noBorder}):null},P=function(e){var n,t=e.choicesWithColour;return(0,m.jsx)(p.k,{textStyle:e.textStyle,label:e.option.localizedKey||e.option.label,labelHidden:e.hideDropDownsLabel||!1,required:!1,ariaLabel:e.option.label,images:t,selectedImage:null===(n=e.selectedOptions)||void 0===n?void 0:n[e.option.key],onImageChange:function(n){var t;e.onOptionChange(e.option.key,n),null===(t=e.onColourSwatchClick)||void 0===t||t.call(e)},i18nText:e.i18nText.imageSwatch,hideOptionalText:!0,displayColoursAsTextOnly:e.displayColoursAsTextOnly,showAllImageSwatches:e.showAllImageSwatches})},j=function(e,n){var t;return O(O({},n&&{error:null===(t=e.customErrorMessage)||void 0===t?void 0:t.errorMessage}),{},{labelCustomComponent:e.option.attribute?(0,m.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",width:"100%"},children:e.labelCustomComponent}):null})},k=function(e,n){var t=n.choices.find(function(n){return n.key===e});return(null==t?void 0:t.title)||e},W=function(e,n,t,o){var r,i="unselected"===n||!!e.option.valueHidden;return(0,m.jsx)(v.Ee,O(O({required:null===(r=e.required)||void 0===r||r,label:w(e),textStyle:e.textStyle,selectedValue:t,labelHidden:!1,valueHidden:i,columns:2,getState:function(n){return e.onOptionChange(e.option.key,n)},horizontal:!0,defaultValue:t},j(e,o)),{},{hideAsterixOnPDP:e.hideAsterixOnPDP,children:e.option.choices.map(function(n,t){return(0,m.jsx)(h.X,{name:e.option.key,title:n.title,value:n.key,disabled:!0!==e.enableOOSAddtoWishlist&&n.disabled,useDisabledStyling:n.useDisabledStyling,borderWidth:"2px"},t)})}))},T=function(e){var n,t,o,r=e.option.choices.filter(function(e){return e.colour}),i=null===(n=e.selectedOptions)||void 0===n?void 0:n[e.option.key],c=k(i,e.option),a=e.option.label===S.Size&&(null===(t=e.customErrorMessage)||void 0===t?void 0:t.displayError),d=(0,m.jsx)(u.N,{required:!e.hideAsterixOnPDP,textStyle:e.textStyle,children:e.showVariantNameNextTocolorLabel?"".concat(w(e)).concat(c?": ".concat(c):""):w(e)});switch(e.option.type){case S.Dropdown:return(0,m.jsxs)(l.Fragment,{children:[e.disableColorDropdown?d:(0,m.jsx)(D,O(O({},e),{},{choicesWithColour:r})),(0,m.jsx)(C,O(O({},e),{},{choicesWithColour:r}))]});case S.Image:return(0,m.jsx)(P,O(O({},e),{},{choicesWithColour:r}));case S.Swatch:return(0,m.jsxs)(l.Fragment,{children:[d,(0,m.jsx)(s.m,{shape:null!==(o=e.swatchShape)&&void 0!==o?o:g.M.SQUARE,colours:r,selectedColour:i,onColourChange:function(n){var t;e.onOptionChange(e.option.key,n),null===(t=e.onColourSwatchClick)||void 0===t||t.call(e)},i18nText:e.i18nText.swatch,showOnlyTwoRows:e.showOnlyTwoRows,displayColoursAsTextOnly:e.displayColoursAsTextOnly})]});default:return W(e,i,c,a)}},R=t(37218);function N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function A(e){for(var n=1;n