{"version":3,"file":"chunk-nyof6rvr.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","o","pure","standalone","_NativePriceFormatterPipe"],"mappings":"qFASaA,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,CAAA,CAAA,CAClBC,CAAmB,CAAA,CAAA,CAAA,CACnBC,CAA2B,CAAA,CAAA,CAAC,CAE5B,OAAO,IAAA,CAAKP,gBAAgBQ,MAAOJ,CAAAA,CAAAA,CAAOC,EAAQC,CAASC,CAAAA,CAAgB,CAC/E,CAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,SAAA,CAAA,CAAA,CAAA,OAAA,IAAA,CAAA,EAlBST,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAAW,EAAA,CAAA,CAAA,IAAA,CAAA,wBAAA,CAAA,IAAA,CAAxBX,EAAwBY,IAAA,CAAA,CAAA,CAAA,CAAAC,WAAA,CAAA,CAAA,CAAA,EAA/B,IAAOb,CAAAA,CAAPc,CAAOd,CAAAA,OAAAA,CAAwB,CAAA"}