import { html } from 'lit';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit-html/directives/style-map.js';
import { T as TailwindElement, s as safeCustomElement } from '../../chunks/index-DluTRl1F.js';
import '../../tailwind-config.js';
import '../../chunks/index-CSnDkMHN.js';
import { c as cn } from '../../chunks/cn-Df_5FiGi.js';
import 'viem';
import 'axe-core';

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 html`
      <div
        data-testid="progress"
        style=${styleMap({
      height: this.height > 16 ? `${this.height}px` : "16px"
    })}
        class=${cn("w-full rounded-24 bg-neutral-95 relative")}
      >
        <div
          style=${styleMap({
      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([
  property({ type: Number })
], LuksoProgress.prototype, "min", 2);
__decorateClass([
  property({ type: Number })
], LuksoProgress.prototype, "max", 2);
__decorateClass([
  property({ type: Number })
], LuksoProgress.prototype, "current", 2);
__decorateClass([
  property({ type: String })
], LuksoProgress.prototype, "variant", 2);
__decorateClass([
  property({ type: Number })
], LuksoProgress.prototype, "height", 2);
LuksoProgress = __decorateClass([
  safeCustomElement("lukso-progress")
], LuksoProgress);

export { LuksoProgress };
