{"version":3,"sources":["webpack:///./src/components/accountDetailsComponent/accountDataTabs/payments/FeeDetails.vue?d5d7","webpack:///./src/components/accountDetailsComponent/accountDataTabs/payments/FeeDetails.vue?c9c8","webpack:///./src/components/accountDetailsComponent/accountDataTabs/payments/FeeDetails.vue?14c7","webpack:///./src/components/accountDetailsComponent/accountDataTabs/payments/FeeDetails.vue","webpack:///./src/services/common/formatters.ts","webpack:///./src/services/payments/helpers.ts","webpack:///./src/components/accountDetailsComponent/accountDataTabs/payments/FeeDetails.vue?e09d","webpack:///./public/images/Vector.svg"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","scopedSlots","_u","key","fn","_v","_s","feeName","feeAmount","_e","isActive","taxRateDisplay","screenText","getScreenText","on","toggleEditCustomFee","attrs","enabled","disableSwitch","$event","proxy","staticRenderFns","FeeDetails","ScreenText","$emit","paymentsModule","changeCustomFeeStatus","updateCustomFee","customFee","APP_UTILITIES","showToastMessage","ToastType","Success","status","Status","Active","feeAmountString","getFormattedFeeDisplayValue","name","taxRate","displayName","percentage","isLoadingCustomFee","isSavingCustomFee","Vue","tslib_1","Watch","Component","components","CardComponent","ToggleSwitch","component","formatCurrency","amount","currencyOptions","APP_CONST","CURRENCY_OPTIONS","currencyFormatter","Intl","NumberFormat","locale","style","currency","format","percentToNumber","value","Number","replace","fee","result","feeValue","toLocaleString","feeType","ConvenienceFeeType","FixedAmount","Percentage","module","exports"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,gBAAgB,CAACE,YAAY,iBAAiBC,YAAYP,EAAIQ,GAAG,CAAC,CAACC,IAAI,WAAWC,GAAG,WAAW,MAAO,CAACN,EAAG,MAAM,CAACE,YAAY,wCAAwC,CAACF,EAAG,MAAM,CAACE,YAAY,0CAA0C,CAACF,EAAG,OAAO,CAACE,YAAY,oBAAoB,CAACN,EAAIW,GAAG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SAChF,gCAGC,IAAIC,EAAkB,IAItB,OAHIX,OAAeG,YACjBQ,EAAkBC,eAA4BZ,OAAeG,YAExDQ,IACR,8BAGC,OAAOX,OAAeG,UAClBH,OAAeG,UAAUU,KACzB,KACL,qCAGC,OAAOb,OAAeG,WAAaH,OAAeG,UAAUW,QAAO,UAC5Dd,OAAeG,UAAUW,QAAQC,YAAW,YAAI7C,KAAKiB,WAAWC,cAAc,+BAA8B,YAAIY,OAAeG,UAAUW,QAAQE,WAAU,KAC9J,OACL,oCAGC,OAAOhB,OAAeiB,oBAAsBjB,OAAekB,sBAC5D,EA/B4B,CAASC,QAsCtCC,QADCC,eAAM,YAAU,qCArCExB,EAAU,QAR9ByB,eAAU,CACTC,WAAY,CACVC,2BACAC,8BAKiB5B,WCvDsa,I,wBCQvb6B,EAAY,eACd,EACA1D,EACA4B,GACA,EACA,KACA,WACA,MAIa,aAAA8B,E,2CCnBf,kDAIM,SAAUC,EAAeC,GAC7B,IAAMC,EAAwCC,OAAUC,iBAClDC,EAAoB,IAAIC,KAAKC,aACjCL,EAAgBM,OAChB,CACEC,MAAO,WACPC,SAA+C,kBAA7BR,EAAgBQ,SAAyBR,EAAgBQ,SAAW,QAG1F,OAAOL,EAAkBM,OAAOV,K,kKCV5B,SAAUW,EAAgBC,GAC9B,OAAOC,OAAO,UAAGD,GAAQE,QAAQ,IAAK,KAGlC,SAAU9B,EAA4B+B,GAC1C,IAAIC,EAASD,EAAIE,SAASC,iBAO1B,OANIH,EAAII,UAAYC,OAAmBC,YACrCL,EAASjB,eAAegB,EAAIE,UAErBF,EAAII,UAAYC,OAAmBE,aAC1CN,EAAS,GAAH,OAAMD,EAAIE,SAAQ,MAEnBD,I,yDCfT,W,qBCAAO,EAAOC,QAAU,IAA0B","file":"js/chunk-3acd248d.7b8e76484015cbeff9ef.1725496708077.min.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('CardComponent',{staticClass:\"card-component\",scopedSlots:_vm._u([{key:\"subtitle\",fn:function(){return [_c('div',{staticClass:\"uk-flex uk-flex-between uk-width-1-1\"},[_c('div',{staticClass:\"uk-flex uk-flex-middle uk-flex-between\"},[_c('span',{staticClass:\"custom-fee-title\"},[_vm._v(_vm._s(_vm.feeName)),(_vm.isActive)?_c('span',[_vm._v(\": \"+_vm._s(_vm.feeAmount))]):_vm._e()]),(_vm.isActive && _vm.taxRateDisplay)?_c('span',{staticClass:\"custom-fee-detailed-info\"},[_vm._v(\"| \"),_c('span',{staticClass:\"custom-fee-title\"},[_vm._v(_vm._s(_vm.screenText.getScreenText('LABEL_TAX_RATE_CAPS')))]),_c('span',{staticClass:\"custom-fee-tax-formatted\"},[_vm._v(_vm._s(_vm.taxRateDisplay))])]):_vm._e(),_c('a',{on:{\"click\":_vm.toggleEditCustomFee}},[_c('img',{staticClass:\"pencil-icon\",attrs:{\"src\":require(\"../../../../../public/images/Vector.svg\")}})])]),_c('div',{staticClass:\"uk-margin-remove-bottom uk-flex uk-flex-middle\"},[_c('ToggleSwitch',{attrs:{\"id\":\"customFeeSwitch\",\"value\":_vm.enabled,\"disabled\":_vm.disableSwitch},on:{\"update:value\":function($event){_vm.enabled=$event}}})],1)])]},proxy:true}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Watch } from 'vue-property-decorator';\nimport CardComponent from '@/commoncomponents/CardComponent.vue';\nimport { ScreenText } from '@/lang/ScreenText';\nimport paymentsModule from '@/store/modules/Payments/module';\nimport ToggleSwitch from '@/commoncomponents/ToggleSwitch.vue';\nimport APP_UTILITIES from '@/utilities/commonFunctions';\nimport { Status } from '@/Model/shared/types';\nimport { getFormattedFeeDisplayValue } from '@/services/payments/helpers';\nimport { ToastType } from '@/Model/toastType';\n\n\n\n@Component({\n components: {\n CardComponent,\n ToggleSwitch\n },\n})\n\n\nexport default class FeeDetails extends Vue {\n\n readonly screenText = new ScreenText();\n enabled = this.isActive;\n\n get isActive(): boolean {\n return !!paymentsModule.customFee && paymentsModule.customFee.status == Status.Active;\n }\n\n get feeAmount(): string {\n let feeAmountString = '0';\n if (paymentsModule.customFee) {\n feeAmountString = getFormattedFeeDisplayValue(paymentsModule.customFee);\n }\n return feeAmountString;\n }\n\n get feeName(): string {\n return paymentsModule.customFee\n ? paymentsModule.customFee.name\n : '';\n }\n\n get taxRateDisplay(): string | null {\n return paymentsModule.customFee && paymentsModule.customFee.taxRate\n ? `${paymentsModule.customFee.taxRate.displayName} ${this.screenText.getScreenText('LABEL_TAX_RATE_JOINING_TEXT')} ${paymentsModule.customFee.taxRate.percentage}%`\n : null;\n }\n\n get disableSwitch(): boolean {\n return paymentsModule.isLoadingCustomFee || paymentsModule.isSavingCustomFee;\n }\n\n toggleEditCustomFee() {\n this.$emit('editCustomFee');\n }\n\n @Watch('enabled')\n async onEnabledChanged() {\n paymentsModule.changeCustomFeeStatus();\n await paymentsModule.updateCustomFee(paymentsModule.customFee!); //We can assert !null because the component wouldn't render in Payments.vue without\n\n if (this.isActive) {\n APP_UTILITIES.showToastMessage(this.screenText.getScreenText('ACTIVE_FEE_TOAST'), ToastType.Success);\n }\n else {\n APP_UTILITIES.showToastMessage(this.screenText.getScreenText('INACTIVE_FEE_TOAST'), ToastType.Success);\n }\n }\n}\n\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FeeDetails.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FeeDetails.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./FeeDetails.vue?vue&type=template&id=418f1c0b&scoped=true&\"\nimport script from \"./FeeDetails.vue?vue&type=script&lang=ts&\"\nexport * from \"./FeeDetails.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./FeeDetails.vue?vue&type=style&index=0&id=418f1c0b&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"418f1c0b\",\n null\n \n)\n\nexport default component.exports","import APP_CONST from '@/constants/AppConst';\nimport { CurrencyInputOptions } from 'vue-currency-input';\n\n\nexport function formatCurrency(amount: number) {\n const currencyOptions: CurrencyInputOptions = APP_CONST.CURRENCY_OPTIONS;\n const currencyFormatter = new Intl.NumberFormat(\n currencyOptions.locale,\n {\n style: 'currency',\n currency: (typeof currencyOptions.currency === 'string') ? currencyOptions.currency : 'USD'\n }\n );\n return currencyFormatter.format(amount);\n}","import { ConvenienceFeeGetResponse, ConvenienceFeeType, CustomFeeResponse } from '@/Model/payments/types';\nimport { formatCurrency } from '../common/formatters';\n\nexport function percentToNumber(value: string) {\n return Number(`${value}`.replace('%', ''));\n}\n\nexport function getFormattedFeeDisplayValue(fee: ConvenienceFeeGetResponse | CustomFeeResponse): string {\n let result = fee.feeValue.toLocaleString(); // Default catch-all in case the fee.feeType value is somehow not one of the ConvenienceFeeType enum members\n if (fee.feeType === ConvenienceFeeType.FixedAmount) {\n result = formatCurrency(fee.feeValue);\n }\n else if (fee.feeType === ConvenienceFeeType.Percentage) {\n result = `${fee.feeValue}%`;\n }\n return result;\n}","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FeeDetails.vue?vue&type=style&index=0&id=418f1c0b&lang=less&scoped=true&\"","module.exports = __webpack_public_path__ + \"img/Vector.db5fdc20.svg\";"],"sourceRoot":""}