"use client";
import { jsx } from "react/jsx-runtime";
import { cn } from "@open-mercato/shared/lib/utils";
function Progress({ value, max = 100, className, ...props }) {
  const percentage = Math.min(100, Math.max(0, Math.round(value / max * 100)));
  return /* @__PURE__ */ jsx(
    "div",
    {
      role: "progressbar",
      "aria-valuenow": value,
      "aria-valuemin": 0,
      "aria-valuemax": max,
      className: cn("relative w-full overflow-hidden rounded-full bg-secondary", className),
      ...props,
      children: /* @__PURE__ */ jsx(
        "div",
        {
          className: "h-full bg-primary transition-all duration-300 ease-in-out",
          style: { width: `${percentage}%` }
        }
      )
    }
  );
}
export {
  Progress
};
//# sourceMappingURL=progress.js.map
