{"version":3,"file":"LinearProgress.mjs","names":["React","LinearProgress","MuiLinearProgress","makeStyles","clsx","useStyles","theme","root","backgroundColor","palette","grey","barColorPrimary","primary","main","barColorSecondary","secondary","barColorSuccess","success","barColorError","error","barColorWarning","warning","barColorInfo","info","customColorBar","props","color","$","_c","otherProps","t0","t1","value","variant","undefined","t2","Symbol","for","isPredefinedColor","includes","t3","classes","t4","t5","t6","t7","t8","t9","t10","t11","t12","t13","bar","t14"],"sources":["../../../src/UI/loading/LinearProgress.jsx"],"sourcesContent":["import React from 'react';\nimport { LinearProgress as MuiLinearProgress } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport clsx from 'clsx';\n\nconst useStyles = makeStyles((theme) => ({\n  root: {\n    backgroundColor: theme.palette.grey[300]\n  },\n  barColorPrimary: {\n    backgroundColor: theme.palette.primary.main\n  },\n  barColorSecondary: {\n    backgroundColor: theme.palette.secondary.main\n  },\n  barColorSuccess: {\n    backgroundColor: theme.palette.success.main\n  },\n  barColorError: {\n    backgroundColor: theme.palette.error.main\n  },\n  barColorWarning: {\n    backgroundColor: theme.palette.warning.main\n  },\n  barColorInfo: {\n    backgroundColor: theme.palette.info.main\n  },\n  // Custom bar color class\n  customColorBar: (props) => ({\n    backgroundColor: props.color\n  })\n}));\n\nexport const LinearProgress = (props) => {\n  const {\n    variant = 'indeterminate',\n    value,\n    color = 'primary',\n    ...otherProps\n  } = props;\n\n  const isPredefinedColor = [\n    'primary',\n    'secondary',\n    'success',\n    'error',\n    'warning',\n    'info'\n  ].includes(color);\n  const classes = useStyles({ color });\n\n  return (\n    <MuiLinearProgress\n      {...otherProps}\n      variant={variant}\n      value={value}\n      classes={{\n        root: classes.root,\n        bar: clsx({\n          [classes.barColorPrimary]: color === 'primary',\n          [classes.barColorSecondary]: color === 'secondary',\n          [classes.barColorSuccess]: color === 'success',\n          [classes.barColorError]: color === 'error',\n          [classes.barColorWarning]: color === 'warning',\n          [classes.barColorInfo]: color === 'info',\n          [classes.customCol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