import { a as TailwindElement, x } from '../../index-92dc158d.js';
import { n, t } from '../../property-eaa52bd9.js';
import { o } from '../../style-map-5aef4b6f.js';
import '../../tailwind-config.js';
import { c as cn } from '../../cn-90c03edf.js';
import '../../directive-2bb7789e.js';

var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};
let LuksoProgress = class extends TailwindElement {
  constructor() {
    super(...arguments);
    this.min = 0;
    this.max = 100;
    this.current = 0;
    this.variant = "success";
    this.height = 16;
  }
  progressWidth() {
    return this.current / this.max * 100;
  }
  render() {
    return x`
      <div
        data-testid="progress"
        style=${o({
      height: this.height > 16 ? `${this.height}px` : "16px"
    })}
        class=${cn("w-full rounded-24 bg-neutral-95 relative")}
      >
        <div
          style=${o({
      width: `${this.progressWidth()}%`
    })}
          class=${cn(
      "rounded-s-24 h-full rounded-e-24  transition-all w-[1%]",
      {
        "bg-green-85": !!this.variant || this.variant === "success",
        "bg-red-85": this.variant === "error",
        "bg-yellow-85": this.variant === "warning"
      }
    )}
        ></div>
        <div
          class=${cn(
      "shadow-neutral-inner-shadow h-full absolute w-full top-0 rounded-24"
    )}
        ></div>
      </div>
    `;
  }
};
__decorateClass([
  n({ type: Number })
], LuksoProgress.prototype, "min", 2);
__decorateClass([
  n({ type: Number })
], LuksoProgress.prototype, "max", 2);
__decorateClass([
  n({ type: Number })
], LuksoProgress.prototype, "current", 2);
__decorateClass([
  n({ type: String })
], LuksoProgress.prototype, "variant", 2);
__decorateClass([
  n({ type: Number })
], LuksoProgress.prototype, "height", 2);
LuksoProgress = __decorateClass([
  t("lukso-progress")
], LuksoProgress);

export { LuksoProgress };
