import { b as TailwindStyledElement, E, x } from '../../chunks/index-5X9ujrWL.js';
import { n } from '../../chunks/property-DfumgIL6.js';
import { c as ce } from '../../chunks/index-B9iart53.js';
import { s as safeCustomElement } from '../../chunks/safe-custom-element-qdGIR_v6.js';
import '../lukso-icon/index.js';
import '../../chunks/index-B_H2eYG_.js';

const style = ":host {\n    display: flex\n}";

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 LuksoAlert = class extends TailwindStyledElement(style) {
  constructor() {
    super(...arguments);
    this.variant = "info";
    this.hasIcon = false;
    this.title = "";
    this.description = "";
    this.styles = ce({
      base: "rounded-8 p-4 flex gap-3 items-center",
      variants: {
        variant: {
          info: "bg-blue-95 text-blue-40",
          warning: "bg-honey-92 text-yellow-25",
          error: "bg-red-95 text-red-55",
          success: "bg-green-95 text-green-45"
        }
      }
    });
  }
  get icon() {
    switch (this.variant) {
      case "warning":
        return { name: "info-circle", color: "yellow-25" };
      case "error":
        return { name: "danger", color: "red-55" };
      case "success":
        return { name: "tick-circle", color: "green-45" };
      default:
        return { name: "info-circle", color: "blue-40" };
    }
  }
  render() {
    const styles = this.styles({
      variant: this.variant
    });
    return x`
      <div class=${styles}>
        ${this.hasIcon ? x`<lukso-icon
              pack="vuesax"
              name="${this.icon.name}"
              color="${this.icon.color}"
            ></lukso-icon>` : E}
        <div class="flex flex-col gap-1">
          ${this.title ? x`<div class="heading-inter-14-bold">${this.title}</div>` : E}
          ${this.description ? x`<lukso-sanitize
                class="paragraph-inter-12-regular"
                html-content="${this.description}"
              ></lukso-sanitize>` : E}
        </div>
      </div>
    `;
  }
};
__decorateClass([
  n({ type: String })
], LuksoAlert.prototype, "variant", 2);
__decorateClass([
  n({ type: Boolean, attribute: "has-icon", reflect: true })
], LuksoAlert.prototype, "hasIcon", 2);
__decorateClass([
  n({ type: String })
], LuksoAlert.prototype, "title", 2);
__decorateClass([
  n({ type: String })
], LuksoAlert.prototype, "description", 2);
LuksoAlert = __decorateClass([
  safeCustomElement("lukso-alert")
], LuksoAlert);

export { LuksoAlert };
