import { darken as u, lighten as c } from "@mui/material/styles";
const a = (o) => {
  try {
    return {
      color: o.color,
      backgroundColor: c(o.backgroundColor, 0.5),
      backgroundHover: c(o.backgroundColor, 0.3),
      backgroundActive: c(o.backgroundColor, 0.7),
      colorTone: c(o.color, 1),
      backgroundColorTone: o.backgroundColor,
      backgroundHoverTone: c(o.backgroundColor, 0.2),
      backgroundActiveTone: u(o.backgroundColor, 0.2)
    };
  } catch {
    return {
      color: "",
      backgroundColor: "",
      backgroundHover: "",
      backgroundActive: "",
      colorTone: "",
      backgroundColorTone: "",
      backgroundHoverTone: "",
      backgroundActiveTone: ""
    };
  }
}, k = (o, r) => {
  const n = r?.externalColor ? a(r?.externalColor) : o.vars.palette.chips[r?.color ?? "default"][r?.variant || "contained"];
  return { color: r?.opacity ? n.color : n.colorTone, finalPalette: n };
};
export {
  k as getColors
};
