{"version":3,"file":"chunk-lojixtjw.js","sources":["packages/sports/libs/odds/feature/native-price/src/external-price-formatter.service.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\n\nimport { INativePrice, NativePrice } from './native-price';\nimport { NativePriceFormatterService } from './native-price-formatter.service';\n\n@Injectable({ providedIn: 'root' })\nexport class ExternalPriceFormatterService {\n private nativeFormatter = inject(NativePriceFormatterService);\n\n /**\n * Converts a price object of type `INativePrice` to an instance of NativePrice and format it with NativePriceFormatter, according to the specified user format.\n *\n * @param nativePrice - The input price of type `INativePrice` that needs to be converted.\n * @returns - The formatted price string.\n */\n format(nativePrice: INativePrice | null | undefined) {\n const price = NativePrice.fromNativePrice(nativePrice || {});\n\n return this.nativeFormatter.format(price);\n }\n}\n"],"names":["ExternalPriceFormatterService","constructor","nativeFormatter","inject","NativePriceFormatterService","format","nativePrice","price","NativePrice","fromNativePrice","factory","ɵfac","providedIn","_ExternalPriceFormatterService"],"mappings":"2HAMaA,IAAAA,CAAAA,CAAAA,CAA6B,IAAA,CAApC,IAAOA,EAAP,MAAOA,CAA6B,CAD1CC,WAAA,EAAA,CAEY,KAAAC,eAAkBC,CAAAA,CAAAA,CAAOC,CAA2B,EAQ5DC,CAAAA,MAAAA,CAAOC,EAA4C,CAC/C,IAAMC,CAAQC,CAAAA,GAAAA,CAAYC,eAAgBH,CAAAA,CAAAA,EAAe,EAAE,CAAA,CAE3D,OAAO,IAAKJ,CAAAA,eAAAA,CAAgBG,OAAOE,CAAK,CAC5C,CAbSP,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,OAAAA,IAAAA,CAAAA,EAAAA,CAAAA,CAA6B,CAA7BA,CAAAA,CAAAA,CAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAA6BU,QAA7BV,CAA6BW,CAAAA,SAAAA,CAAAC,WADhB,MAAM,CAAA,EAC1B,IAAOZ,CAAAA,CAAPa,CAAOb,CAAAA,OAAAA,CAA6B,CAAA"}