{"version":3,"file":"pages/Resources/BundleDiff/DiffContainer/utils.mjs","sources":["../../../../../src/pages/Resources/BundleDiff/DiffContainer/utils.tsx"],"sourcesContent":["import { Client } from '@rsdoctor/types';\nimport { Typography } from 'antd';\nimport { Color } from 'src/constants';\nimport { formatSize } from 'src/utils';\n\nexport const formatDiffSize = (\n  bSize: number,\n  cSize: number,\n  state: Client.RsdoctorClientDiffState,\n  propsStyle?: Record<string, string | number>,\n) => {\n  return (\n    <>\n      {cSize - bSize === 0 ? (\n        <></>\n      ) : (\n        <Typography.Text\n          strong\n          style={{\n            color:\n              state === Client.RsdoctorClientDiffState.Up\n                ? Color.Red\n                : Color.Green,\n            ...propsStyle,\n          }}\n        >\n          {state === Client.RsdoctorClientDiffState.Up ? '+' : '-'}\n          {formatSize(Math.abs(cSize - bSize))}\n        </Typography.Text>\n      )}\n    </>\n  );\n};\n"],"names":["formatDiffSize","bSize","cSize","state","propsStyle","Typography","Client","Color","formatSize","Math"],"mappings":";;;;;AAKO,MAAMA,iBAAiB,CAC5BC,OACAC,OACAC,OACAC,aAEO,WAAP,GACE;kBACGF,QAAQD,UAAU,IAAI,WAAJ,GACjB,kCAEA,KAACI,WAAW,IAAI;YACd,QAAM;YACN,OAAO;gBACL,OACEF,UAAUG,OAAO,uBAAuB,CAAC,EAAE,GACvCC,MAAM,GAAG,GACTA,MAAM,KAAK;gBACjB,GAAGH,UAAU;YACf;;gBAECD,UAAUG,OAAO,uBAAuB,CAAC,EAAE,GAAG,MAAM;gBACpDE,WAAWC,KAAK,GAAG,CAACP,QAAQD"}