1import{D as s,E as a,S as i,a0 as u,H as d,Q as l}from"./vue.00f7c436.js";import{_ as m}from"./index.b39fe1b1.js";import{u as c}from"./useCurrency.91774701.js";import"./sentry.09480738.js";const y={name:"TmlCurrency",inject:["theme"],props:{forceCurrency:String,value:Number,noRounding:Boolean,primary:Boolean,discounted:Boolean},computed:{currency(){return this.$store.getters["currency/get"](this.forceCurrency)},convertedValue(){return this.$store.getters["currency/convert"](this.value,this.forceCurrency)},isNative(){return this.convertedValue===this.value},displayValue(){var t;let e=this.convertedValue;if(this.noRounding)return c(e,this.currency.code).value;if(!this.isNative){const r=(t=this.theme().get("productPage.convertedPrice.roundTo"))!=null?t:1;r!=="None"&&(e=(Math.round(e*(1/r))/(1/r)).toFixed(2))}return e%1===0?c(e,this.currency.code,{minimumFractionDigits:0,maximumFractionDigits:0}).value:c(e,this.currency.code).value}}},_={class:"value"};function h(e,t,r,p,v,n){var o;return(o=n.currency)!=null&&o.code?(s(),a("span",{key:0,class:d(["tml-currency",{"primary-text":r.primary&&!r.discounted,"discount-price":r.discounted}])},[i("span",_,u(n.displayValue),1)],2)):l("",!0)}const V=m(y,[["render",h],["__scopeId","data-v-58d07d93"]]);export{V as default}; 2//# sourceMappingURL=TmlCurrency.1d3e8054.js.map
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.