import { css as d } from "styled-components";
import { getColorAlias as o } from "../../utils/index.js";
const c = (r, e, a) => {
  const t = o(e), n = o(a), u = r === "star" ? d`
          background-image: linear-gradient(
            45deg,
            ${t},
            ${n},
            ${t}
          );
          background-size: 248px 100%;
        ` : d`
          background-image: linear-gradient(
            90deg,
            ${t},
            ${n},
            ${t}
          );
          background-size: 200px 100%;
        `;
  return d`
    background-color: ${r === "star" ? null : t};
    color: ${r === "star" ? t : null};
    ${u}
    background-repeat: no-repeat;
  `;
}, g = (r) => {
  let e, a;
  switch (r.variant) {
    case "box":
      e = "100px";
      break;
    case "circle":
      e = "100px", a = "100px";
      break;
    case "pill":
      e = "40px";
      break;
    case "text":
      e = "20px";
      break;
    case "star":
      e = "50px", a = "50px";
      break;
    default:
      e = "40px";
      break;
  }
  return d`
    height: ${r.height ?? e};
    width: ${r.width ?? a ?? "100%"};
  `;
}, i = (r) => {
  switch (r) {
    case "roundedA":
      return d`
        border-radius: ${(e) => e.theme.radius.roundedA};
      `;
    case "roundedB":
      return d`
        border-radius: ${(e) => e.theme.radius.roundedB};
      `;
    case "roundedC":
      return d`
        border-radius: ${(e) => e.theme.radius.roundedC};
      `;
    case "roundedD":
      return d`
        border-radius: ${(e) => e.theme.radius.roundedD};
      `;
    case "roundedNone":
      return d`
        border-radius: ${(e) => e.theme.radius.roundedNone};
      `;
    default:
      return null;
  }
}, b = (r, e) => {
  let a = e.radius.roundedA;
  if (r.variant === "box") {
    if (r.radius)
      return i(r.radius);
    a = e.radius.roundedB;
  } else r.variant === "pill" ? a = e.radius.roundedD : r.variant === "circle" && (a = e.radius.roundedE);
  return d`
    border-radius: ${a};
  `;
}, k = (r) => {
  if (r === "star")
    return d`
      clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 57%,
        79% 91%,
        50% 70%,
        21% 91%,
        32% 57%,
        2% 35%,
        39% 35%
      );
    `;
};
export {
  c as getSkeletonColors,
  g as getSkeletonDimensions,
  b as getSkeletonRadius,
  k as getStar
};
