1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["ProductPricesSubscription-public"],{"./npm-packages/@shopwp/components/src/products/product/pricing/subscription/index.jsx"(e,t,c){c.r(t),c.d(t,{default:()=>n});var i=c("./npm-packages/@shopwp/components/src/price/index.jsx"),s=c("./npm-packages/@shopwp/components/src/shop/_state/hooks.js");function a(e){var t=e.productState,c=e.insideSubscriptionsWidget,a=(0,s.T)();return React.createElement(React.Fragment,null,React.createElement("p",{className:"swp-price swp-final-price".concat(c?"":" swp-price swp-product-price"),"data-is-compare-at":"false"},React.createElement(i.A,{price:t.subscriptionPricing.saved?t.subscriptionPricing.newPrice:t.subscriptionPricing.oldPrice})),t.subscriptionPricing.saved?React.createElement("p",{className:"swp-price".concat(c?"":" swp-price swp-product-price"),"data-is-compare-at":"true"},React.createElement(i.A,{price:t.subscriptionPricing.oldPrice})):null,"percent"===t.subscriptionPricing.savingsType?React.createElement("p",{className:"swp-save-inline"},"(",a.t.l.save," ",t.subscriptionPricing.saved,"%)"):"fixed"===t.subscriptionPricing.savingsType?React.createElement("p",{className:"swp-save-inline"},"(",a.t.l.save," ",React.createElement(i.A,{price:t.subscriptionPricing.saved}),")"):null)}function r(e){var t=e.productState;return e.insideSubscriptionsWidget,React.createElement(React.Fragment,null,React.createElement("p",{className:"swp-price swp-final-price"},React.createElement(i.A,{price:t.selectedVariant.price.amount})),t.selectedVariant.compareAtPrice?React.createElement("p",{className:"swp-price","data-is-compare-at":"true"},React.createElement(i.A,{price:t.selectedVariant.compareAtPrice.amount})):null)}const n=function(e){var t=e.productState,c=e.subType,i=e.insideSubscriptionsWidget;return React.createElement(React.Fragment,null,t.selectedVariant&&t.subscriptionPricing&&"subscription"===c?React.createElement(a,{productState:t,insideSubscriptionsWidget:i}):null,t.selectedVariant&&"onetime"===c?React.createElement(r,{productState:t,insideSubscriptionsWidget:i}):null)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.