import { jsxs as n, jsx as a } from "react/jsx-runtime";
import { classNames as y } from "./index-classNames.js";
import { parseCssVariable as x } from "./index-css-variables-parser.js";
import { ComponentContainer as k } from "./index-ComponentContainer.js";
import { Text as p, FontWeights as C, TextTypes as d } from "./index-Text.js";
import "react";
import i from "./index-ProgressCircle.module.scss.js";
const T = (m) => {
  const {
    progress: h,
    className: f
  } = m;
  let {
    size: e,
    color: c
  } = m;
  e = e > 100 ? 100 : e < 1 ? 1 : e, c = x(c ?? "--s400");
  const t = e * 0.1, r = (e - t) / 2, l = r - t * 0.5, s = l * 2 * Math.PI, g = s - h / 100 * s, o = 2 * r;
  return n(k, {
    className: y(i.progressCircleContainer, f),
    style: {
      width: o,
      height: o
    },
    children: [n("svg", {
      height: o,
      width: o,
      className: i.progressCircleSvg,
      children: [a("circle", {
        fill: "transparent",
        strokeWidth: t,
        strokeDasharray: `${s} ${s}`,
        stroke: "var(--n200)",
        r: l,
        cx: r,
        cy: r
      }), a("circle", {
        className: i.progressCircleValue,
        fill: "transparent",
        strokeWidth: t,
        stroke: c,
        strokeDasharray: `${s} ${s}`,
        style: {
          strokeDashoffset: g
        },
        r: l,
        cx: r,
        cy: r
      })]
    }), n("div", {
      className: i.progress,
      children: [a(p, {
        type: d.textIntro,
        fontWeight: C.bold,
        translate: !1,
        children: h
      }), a(p, {
        type: d.textHelp,
        fontSize: 14,
        translate: !1,
        children: "%"
      })]
    })]
  });
};
export {
  T as ProgressCircle
};
