'use strict';

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

const lit = require('lit');
const decorators_js = require('lit/decorators.js');
const styleMap_js = require('lit-html/directives/style-map.js');
const index = require('../../chunks/index-BBPgtFEP.js');
require('../../tailwind-config.cjs');
require('../../chunks/index-oDo-wiUs.js');
const cn = require('../../chunks/cn-JMx_imgS.js');
require('viem');
require('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;
};
exports.LuksoProgress = class LuksoProgress extends index.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 lit.html`
      <div
        data-testid="progress"
        style=${styleMap_js.styleMap({
      height: this.height > 16 ? `${this.height}px` : "16px"
    })}
        class=${cn.cn("w-full rounded-24 bg-neutral-95 relative")}
      >
        <div
          style=${styleMap_js.styleMap({
      width: `${this.progressWidth()}%`
    })}
          class=${cn.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.cn(
      "shadow-neutral-inner-shadow h-full absolute w-full top-0 rounded-24"
    )}
        ></div>
      </div>
    `;
  }
};
__decorateClass([
  decorators_js.property({ type: Number })
], exports.LuksoProgress.prototype, "min", 2);
__decorateClass([
  decorators_js.property({ type: Number })
], exports.LuksoProgress.prototype, "max", 2);
__decorateClass([
  decorators_js.property({ type: Number })
], exports.LuksoProgress.prototype, "current", 2);
__decorateClass([
  decorators_js.property({ type: String })
], exports.LuksoProgress.prototype, "variant", 2);
__decorateClass([
  decorators_js.property({ type: Number })
], exports.LuksoProgress.prototype, "height", 2);
exports.LuksoProgress = __decorateClass([
  index.safeCustomElement("lukso-progress")
], exports.LuksoProgress);
