'use client';

// src/components/Progress/Progress.tsx
import * as React from "react";
import { cn } from "@paalan/react-shared/lib";
import * as ProgressPrimitive from "@radix-ui/react-progress";
import { cva } from "class-variance-authority";
import { jsx } from "react/jsx-runtime";
var progressRootVariants = cva("relative h-2 w-full overflow-hidden rounded-full", {
  variants: {
    variant: {
      default: "bg-primary/20",
      primary: "bg-primary/20",
      secondary: "bg-secondary/20",
      danger: "bg-danger/20",
      warning: "bg-warning/20",
      success: "bg-success/20",
      info: "bg-info/20",
      dark: "bg-foreground/20",
      accent: "bg-accent/20"
    }
  },
  defaultVariants: {
    variant: "default"
  }
});
var progressIndicatorVariants = cva("size-full flex-1 transition-all", {
  variants: {
    variant: {
      default: "bg-primary",
      primary: "bg-primary",
      secondary: "bg-secondary",
      danger: "bg-danger",
      warning: "bg-warning",
      success: "bg-success",
      info: "bg-info",
      dark: "bg-foreground",
      accent: "bg-accent"
    }
  },
  defaultVariants: {
    variant: "default"
  }
});
var Progress = React.forwardRef(
  ({ className, value, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, { ref, className: cn(progressRootVariants({ variant }), className), ...props, children: /* @__PURE__ */ jsx(
    ProgressPrimitive.Indicator,
    {
      className: cn(progressIndicatorVariants({ variant })),
      style: { transform: `translateX(-${100 - (value || 0)}%)` }
    }
  ) })
);
Progress.displayName = ProgressPrimitive.Root.displayName;
export {
  Progress,
  progressIndicatorVariants,
  progressRootVariants
};
