{"version":3,"file":"CounterWithTrend-l4k-qG2D.js","sources":["../../../node_modules/@mui/icons-material/esm/TrendingDown.js","../../../node_modules/@mui/icons-material/esm/TrendingUp.js","../../../frontend/src/Components/DesignSystem/CounterWithTrend/CounterWithTrend.tsx"],"sourcesContent":["\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z\"\n}), 'TrendingDown');","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z\"\n}), 'TrendingUp');","import React from 'react';\nimport { FormattedMessage, FormattedNumber } from 'react-intl';\nimport { Box, Card, Tooltip, Typography, Skeleton } from '@mui/material';\nimport {\n TrendingUp as TrendingUpIcon,\n TrendingDown as TrendingDownIcon,\n} from '@mui/icons-material';\nimport { get } from 'lodash';\n\nfunction CounterWithTrend({\n loading,\n label,\n value,\n icon,\n percentage,\n variant = 'elevation',\n hideTrendIcon = false,\n numberProps = {},\n}: any) {\n const TrendIcon = percentage >= 0 ? TrendingUpIcon : TrendingDownIcon;\n let trendColor = percentage >= 0 ? 'success.main' : 'error.main';\n\n if (hideTrendIcon) {\n trendColor = 'text.primary';\n }\n\n return (\n ({\n padding: theme.spacing(2, 2, 1, 2),\n height: '100%',\n })}\n >\n \n \n {label}\n \n {icon}\n \n\n {(loading || value === undefined || Number.isNaN(value)) && (\n \n \n {percentage !== undefined && (\n <>\n \n \n \n )}\n \n )}\n\n {!loading && value !== undefined && !Number.isNaN(value) && (\n \n \n \n )}\n\n {!loading && !!percentage && (\n }\n disableHoverListener={hideTrendIcon}\n arrow\n >\n ({\n color: get(theme.palette, trendColor),\n display: 'inline-flex',\n fontWeight: 'bold',\n })}\n >\n \n {!hideTrendIcon && percentage > 0 && '+'}\n \n \n {!hideTrendIcon && (\n \n \n \n )}\n \n \n )}\n \n );\n}\n\nexport default CounterWithTrend;\n"],"names":["TrendingDownIcon","createSvgIcon","_jsx","TrendingUpIcon","CounterWithTrend","_ref","loading","label","value","icon","percentage","_ref$variant","variant","_ref$hideTrendIcon","hideTrendIcon","_ref$numberProps","numberProps","TrendIcon","trendColor","React","createElement","Card","sx","theme","padding","spacing","height","Box","display","alignItems","gap","Typography","component","fontWeight","undefined","Number","isNaN","mt","mb","Skeleton","width","Fragment","FormattedNumber","_extends","notation","Tooltip","title","FormattedMessage","id","disableHoverListener","arrow","color","get","palette","style","minimumFractionDigits","ml"],"mappings":"wJAIA,MAAAA,EAAeC,EAA2BC,EAAI,IAAC,OAAQ,CACrD,EAAG,wEACL,CAAC,EAAG,cAAc,ECFlBC,EAAeF,EAA2BC,EAAI,IAAC,OAAQ,CACrD,EAAG,yEACL,CAAC,EAAG,YAAY,0NCGhB,SAASE,EAAgBC,EASjB,CAAA,IARNC,EAAOD,EAAPC,QACAC,EAAKF,EAALE,MACAC,EAAKH,EAALG,MACAC,EAAIJ,EAAJI,KACAC,EAAUL,EAAVK,WAAUC,EAAAN,EACVO,QAAAA,EAAOD,IAAG,OAAA,YAAWA,EAAAE,EAAAR,EACrBS,cAAAA,EAAaD,IAAG,OAAA,GAAKA,EAAAE,EAAAV,EACrBW,YAAAA,EAAWD,IAAA,OAAG,CAAA,EAAEA,EAEVE,EAAYP,GAAc,EAAIP,EAAiBH,EACjDkB,EAAaR,GAAc,EAAI,eAAiB,aAEpD,OAAII,IACWI,EAAA,gBAIbC,EAAAC,cAACC,EAAI,CACHT,QAAAA,EACAU,GAAI,SAACC,EAAU,CAAM,MAAA,CACnBC,QAASD,EAAME,QAAQ,EAAG,EAAG,EAAG,CAAC,EACjC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