(window.webpackJsonpvtex_store_components_3_178_5=window.webpackJsonpvtex_store_components_3_178_5||[]).push([["ProductPrice"],{0:function(e,t){e.exports=React},1:function(e,t){e.exports=R},192:function(e,t,s){"use strict";s.r(t),function(e){var t=s(3);s.p=Object(t.getPublicPath)("vtex.store-components@3.178.5");var i=Object(t.register)((function(){return s(237)}),e,"vtex.store-components@3.178.5","vtex.store-components@3.x","ProductPrice");i.renderHotReload,i.setupHMR}.call(this,s(15)(e))},2:function(e,t){e.exports=PropTypes},237:function(e,t,s){"use strict";s.r(t);var i=s(5),l=s(57),r=s(0),n=s.n(r),a=s(47),o=s.n(a),c=s(1),u=s(8),d=s(34),p=s(45);function P(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function b(e){for(var t=1;t0},f=function(e){var t=e.labelSellingPrice,s=e.showListPrice,i=e.showInstallments,a=e.showLabels,P=e.showSavings,f=Object(l.a)(e,["labelSellingPrice","showListPrice","showInstallments","showLabels","showSavings"]),g=Object(r.useContext)(o.a),w=function(e){var t,s,i=Object(u.useRuntime)(),l=e.selectedItem,r=null===(t=null==i?void 0:i.getSettings)||void 0===t?void 0:t.call(i,"vtex.store");return(null==r?void 0:r.enableDefaultSeller)?null===(s=Object(d.a)(null==l?void 0:l.sellers))||void 0===s?void 0:s.commertialOffer:(console.warn("In feature releases the enableDefaultSeller setting will be removed, and the commercialOffer will be calculated only by defaultSeller"),Object(c.path)(["sellers",0,"commertialOffer"],l))}(g),v=f.className,_=f.listPriceContainerClass,O=f.listPriceLabelClass,y=f.listPriceClass,C=f.sellingPriceContainerClass,x=f.sellingPriceLabelClass,L=f.sellingPriceClass,j=f.savingsContainerClass,S=f.savingsClass,R=f.interestRateClass,E=f.installmentContainerClass,N=f.installmentClass,D=f.loaderClass,I=f.listPrice,M=f.sellingPrice,T=f.installments,k=!g||Object(c.isEmpty)(g)||!Object(c.has)("query",f)&&!Object(c.has)("params",f)?b(b({},f),{},{labelSellingPrice:t,showListPrice:s,showInstallments:i,showLabels:a,showSavings:P,showProductPrice:!0}):b(b({},f),{},{styles:f.styles||h,className:v||"",listPriceContainerClass:_||"t-small-s t-small-ns c-muted-2 mb2",sellingPriceLabelClass:x||"t-heading-6-s t-heading-5-ns dib",listPriceLabelClass:O||"dib strike",listPriceClass:y||"ph2 dib strike",sellingPriceContainerClass:C||"pv1 b c-on-base",sellingPriceClass:L||"t-heading-2-s dib ph2",installmentContainerClass:E||"t-mini-s t-small-ns c-on-base",installmentClass:N||"t-body",interestRateClass:R||"dib ph2",savingsContainerClass:j||"c-success mt3",savingsClass:S||"dib t-small",loaderClass:D||"h4-s mw6-s pt2-s",listPrice:I||Object(c.path)(["ListPrice"],w),sellingPrice:M||Object(c.path)(["Price"],w),installments:T||Object(c.path)(["Installments"],w),labelSellingPrice:t,showLabels:a,showInstallments:i,showListPrice:s,showSavings:P,showProductPrice:m(w)}),H=k.showProductPrice,A=Object(l.a)(k,["showProductPrice"]);return H?n.a.createElement(p.a,A):null};f.schema={title:"admin/editor.productPrice.title",description:"admin/editor.productPrice.description",type:"object",properties:{labelSellingPrice:{type:"string",title:"admin/editor.productPrice.labelSellingPrice",default:p.a.defaultProps.labelSellingPrice,isLayout:!1},labelListPrice:{type:"string",title:"admin/editor.productPrice.labelListPrice",default:p.a.defaultProps.labelListPrice,isLayout:!1},showSellingPriceRange:{type:"boolean",title:"admin/editor.productPrice.showSellingPriceRange",default:p.a.defaultProps.showSellingPriceRange,isLayout:!0},showListPriceRange:{type:"boolean",title:"admin/editor.productPrice.showListPriceRange",default:p.a.defaultProps.showListPriceRange,isLayout:!0},showListPrice:{type:"boolean",title:"admin/editor.productPrice.showListPrice",default:p.a.defaultProps.showListPrice,isLayout:!0},showLabels:{type:"boolean",title:"admin/editor.productPrice.showLabels",default:p.a.defaultProps.showLabels,isLayout:!0},showInstallments:{type:"boolean",title:"admin/editor.productPrice.showInstallments",default:p.a.defaultProps.showInstallments,isLayout:!0},showSavings:{type:"boolean",title:"admin/editor.productPrice.showSavings",default:p.a.defaultProps.showSavings,isLayout:!0}}};var g=f;t.default=g},34:function(e,t,s){"use strict";function i(e){if(e&&0!==e.length){var t=e.find((function(e){return e.sellerDefault}));return t||e[0]}}s.d(t,"a",(function(){return i}))},38:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.native-types@0.x/IOMessage"]},4:function(e,t){e.exports=ReactIntl},47:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/ProductContext"]},58:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.format-currency@0.x/formatCurrency"]},6:function(e,t){e.exports=Classnames},60:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.format-currency@0.x/FormattedCurrency"]},7:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},8:function(e,t){e.exports=__RENDER_8_RUNTIME__}},[[192,"common",3]]]);