import { jsx, jsxs } from "react/jsx-runtime";
/* empty css                        */
import LinearProgress from "../../node_modules/@mui/material/LinearProgress/LinearProgress.js";
function getLabel(props) {
  if (props.customLabel) return props.customLabel;
  if (props.status === "completed") return "Completed";
  if (props.status === "failed") return "Failed";
  return `${Math.round(props.value ?? 0)}%${props.showTime !== false ? ` • ${props.time ?? 0} seconds remaining` : ""}`;
}
function ProgressBar({
  value = 10,
  showTime = true,
  time = 30,
  customLabel,
  status = "remaining",
  LinearProgressProps: linearProps,
  ...rest
}) {
  return /* @__PURE__ */ jsx("div", { className: "progressbar_layout", "data-testid": rest["data-testid"], children: /* @__PURE__ */ jsxs("div", { className: `progress_container progress_container_${status}`, children: [
    /* @__PURE__ */ jsx("div", { className: "progressbar_label_container", children: /* @__PURE__ */ jsx("div", { className: "label_name", children: getLabel({ value, showTime, time, customLabel, status }) }) }),
    /* @__PURE__ */ jsx("div", { className: "progressbar_status", children: /* @__PURE__ */ jsx(
      LinearProgress,
      {
        className: `progress_bar progress_bar_${status}`,
        value,
        variant: "determinate",
        ...linearProps
      }
    ) })
  ] }) });
}
ProgressBar.displayName = "ProgressBar";
export {
  ProgressBar
};
