"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[12],{15:function(e,l,i){var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0}),l.ProductHeroPrice=function({memberPricingEnabled:e,useSharedState:l,pricingPolicy:i,tagOverride:c}){const r=l(),{selectedVariant:s}=r((e=>({selectedVariant:e.selectedVariant})));return(0,n.jsx)(o,{memberPricingEnabled:e,selectedVariant:s,pricingPolicy:i,tagOverride:c})},l.ProductPrice=o,l.BundlePrice=function({small:e,tagOverride:l,compareAtRetailBundlePrice:i,compareAtBundlePrice:c,bundlePrice:r,hidePrice:a,hideFinalPrice:t}){const o=void 0===c||void 0===i||0===i||i<=c?void 0:d(i),p=t?"":d(r);return a?(0,n.jsx)("div",{style:"margin-bottom: var(--section-padding);",children:!e&&(0,n.jsx)(u,{message:null!=l?l:null})}):(0,n.jsx)("div",{class:[s.default.container,e?s.default.small:""].join(" "),children:(0,n.jsxs)("h2",{class:[s.default.productPrice,e?s.default.small:""].join(" "),children:[void 0!==o&&(0,n.jsx)("span",{class:s.default.compareAtPrice,children:o}),c&&c>r&&(0,n.jsxs)("span",{class:s.default.compareAtPrice,children:["$",c]}),(0,n.jsx)("span",{children:p}),!e&&(0,n.jsx)(u,{message:null!=l?l:null})]})})},l.PricePill=u,l.PricingPolicy=p;const n=i(0),r=i(1),s=c(i(12)),a=i(3),t=i(17);function d(e){if(!e)return"";const l="string"==typeof e?parseFloat(e):e;return l===Math.round(l)?`$${l.toString()}`:`$${l.toFixed(2)}`}function o({memberPricingEnabled:e,selectedVariant:l,small:i,tagOverride:c,pricingPolicy:a}){var o,f,m;const h=d(null==l?void 0:l.compareAtPrice),x=(0,t.getPreOrderMessage)(l);return(0,n.jsx)("div",{class:[s.default.container,i?s.default.small:""].join(" "),children:e?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)("h2",{class:s.default.productPriceDefault,children:["$129.00 | ",(0,n.jsx)("span",{children:"Up to 70% off with member pricing"})]}),(0,n.jsx)("div",{class:s.default.login,children:(0,n.jsx)("a",{class:s.default.memberLink,children:"Login or Signup"})})]}):(0,n.jsxs)("h2",{class:[s.default.productPrice,i?s.default.small:""].join(" "),children:[h&&(0,n.jsx)("span",{class:s.default.compareAtPrice,children:h}),(0,n.jsx)("span",{children:null!==(o=d(null==l?void 0:l.price))&&void 0!==o?o:"NA"}),!i&&(0,n.jsx)(u,{message:null!=c?c:x||(h?"Sale":null)}),h&&(null==a?void 0:a.enabled)&&(0,n.jsx)(p,{compareAtPrice:parseFloat(null!==(f=null==l?void 0:l.compareAtPrice)&&void 0!==f?f:""),price:parseFloat(null!==(m=null==l?void 0:l.price)&&void 0!==m?m:"NA"),pricingPolicy:a})]})})}function u({message:e,small:l}){return e?(0,n.jsx)("span",{class:[s.default.pricePill,l?s.default.small:""].join(" "),children:e}):(0,n.jsx)(r.Fragment,{})}function p({compareAtPrice:e,price:l,pricingPolicy:i}){function c(){document.body.style.overflow="auto"}const[t,d]=(0,a.useState)(!1);return(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("label",{className:s.default.pricingPolicyLabel,for:"pricingPolicy",onClick:function(){document.body.style.overflow="hidden"},children:null==i?void 0:i.title}),(0,n.jsx)("input",{type:"checkbox",id:"pricingPolicy",className:s.default.pricingPolicyCheckbox}),(0,n.jsxs)("div",{className:s.default.modalOverlay,children:[(0,n.jsx)("label",{htmlFor:"pricingPolicy",className:s.default.modalBackground,onClick:c}),(0,n.jsxs)("div",{className:s.default.modal,children:[(0,n.jsx)("label",{for:"pricingPolicy",className:s.default.closeBtn,onClick:c,children:"X"}),(0,n.jsx)("h1",{class:s.default.pricingHeader,children:null==i?void 0:i.title}),!!e&&(0,n.jsx)("div",{class:s.default.pricingText,children:null==i?void 0:i.offer_title}),!!e&&(0,n.jsxs)("div",{class:s.default.pricingText,children:[null==i?void 0:i.compare_at_price_title,": $",e]}),(0,n.jsxs)("div",{class:s.default.pricingText,children:[null==i?void 0:i.price_title,": $",l]}),(0,n.jsxs)("div",{className:s.default.pricePolicyInnercontainer,children:[(0,n.jsxs)("div",{className:s.default.header,onClick:()=>{d(!t)},children:[(0,n.jsx)("span",{children:null==i?void 0:i.pricing_policy_title}),(0,n.jsx)("button",{className:s.default.toggleButton,children:t?"-":"+"})]}),t&&(0,n.jsx)("div",{className:s.default.content,children:(0,n.jsx)("p",{children:null==i?void 0:i.pricing_policy})})]}),(0,n.jsx)("div",{class:s.default.pricingText,children:null==i?void 0:i.footer_message}),(0,n.jsx)("div",{style:"height: 100px;"})]})]})]})}}}]);