{"version":3,"file":"chunk-c4vu57ia.js","sources":["packages/sports/libs/odds/feature/native-price/src/native-price-formatter.pipe.ts"],"sourcesContent":["import { Pipe, PipeTransform, inject } from '@angular/core';\n\nimport { NativePrice } from './native-price';\nimport { NativePriceFormatterService } from './native-price-formatter.service';\n\n@Pipe({\n name: 'msNativePriceFormatter',\n standalone: true,\n})\nexport class NativePriceFormatterPipe implements PipeTransform {\n private nativeFormatter = inject(NativePriceFormatterService);\n /**\n * Format an instance of NativePricewith NativePriceFormatter, according to the specified user format.\n *\n * @param price - The input price of type `INativePrice` that needs to be converted.\n * @param cutOff - limiting the decimal points to 2, only for EU odds.\n * @param cutZero - Remove trailing 0, only for EU odds.\n * @param maxDecimalPlaces - max decimal points for the formatted odds\n * @returns - The formatted price string.\n */\n transform(\n price: NativePrice | string | number | null | undefined,\n cutOff: boolean = false,\n cutZero: boolean = false,\n maxDecimalPlaces: number = 3,\n ): string {\n return this.nativeFormatter.format(price, cutOff, cutZero, maxDecimalPlaces);\n }\n}\n"],"names":["NativePriceFormatterPipe","constructor","nativeFormatter","inject","NativePriceFormatterService","transform","price","cutOff","cutZero","maxDecimalPlaces","format","pure","_NativePriceFormatterPipe"],"mappings":"iFASaA,IAAAA,CAAAA,CAAAA,CAAwB,IAAA,CAA/B,IAAOA,EAAP,MAAOA,CAAwB,CAJrCC,WAAA,EAAA,CAKY,KAAAC,eAAkBC,CAAAA,CAAAA,CAAOC,CAA2B,EAU5DC,CAAAA,SAAAA,CACIC,EACAC,CAAkB,CAAA,KAAA,CAClBC,EAAmB,KACnBC,CAAAA,CAAAA,CAA2B,EAAC,CAE5B,OAAO,KAAKP,eAAgBQ,CAAAA,MAAAA,CAAOJ,EAAOC,CAAQC,CAAAA,CAAAA,CAASC,CAAgB,CAC/E,CAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,SAAA,CAAA,CAAA,CAAA,OAAA,IAAA,CAAA,EAlBST,EAAwB,CAAxBA,CAAAA,CAAAA,CAAAA,UAAAA,CAAAA,EAAAA,CAAAA,CAAAA,IAAAA,CAAAA,wBAAAA,CAAAA,IAAAA,CAAAA,CAAAA,CAAwBW,KAAA,IAAA,CAAA,EAA/B,IAAOX,CAAAA,CAAPY,CAAOZ,CAAAA,OAAAA,CAAwB,CAAA"}