'use client';
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/Progress/index.ts
var Progress_exports = {};
__export(Progress_exports, {
  Progress: () => Progress,
  progressIndicatorVariants: () => progressIndicatorVariants,
  progressRootVariants: () => progressRootVariants
});
module.exports = __toCommonJS(Progress_exports);

// src/components/Progress/Progress.tsx
var React = __toESM(require("react"), 1);
var import_lib = require("@paalan/react-shared/lib");
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
var import_class_variance_authority = require("class-variance-authority");
var import_jsx_runtime = require("react/jsx-runtime");
var progressRootVariants = (0, import_class_variance_authority.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 = (0, import_class_variance_authority.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__ */ (0, import_jsx_runtime.jsx)(ProgressPrimitive.Root, { ref, className: (0, import_lib.cn)(progressRootVariants({ variant }), className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
    ProgressPrimitive.Indicator,
    {
      className: (0, import_lib.cn)(progressIndicatorVariants({ variant })),
      style: { transform: `translateX(-${100 - (value || 0)}%)` }
    }
  ) })
);
Progress.displayName = ProgressPrimitive.Root.displayName;
