'use strict';

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

const shared_tailwindElement_index = require('../../index-179a633e.cjs');
const queryAssignedElements = require('../../query-assigned-elements-d5e45650.cjs');
const index = require('../../index-1d3f4a5a.cjs');
const index$1 = require('../../index-af864ee6.cjs');
require('../../bundle-mjs-d58a83c6.cjs');
require('../../directive-8278ab14.cjs');

const style = ":host {\n    display: inline-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;
};
exports.LuksoTag = class LuksoTag extends shared_tailwindElement_index.TailwindStyledElement(style) {
  constructor() {
    super(...arguments);
    this.size = "small";
    this.isRounded = false;
    this.backgroundColor = "";
    this.borderColor = "";
    this.textColor = "";
    this.tagStyles = index.ce({
      base: "inline-flex items-center justify-center border border-neutral-20 text-neutral-20 px-2 whitespace-nowrap",
      variants: {
        size: {
          "x-small": "font-inter text-8 font-500 leading-20 h-[20px] px-1 rounded-4",
          small: "paragraph-inter-12-medium h-[28px] px-2 rounded-8",
          large: "paragraph-inter-14-medium h-[34px] px-4 rounded-8"
        },
        isRounded: {
          true: "rounded-[56px]"
        }
      },
      compoundVariants: [
        {
          size: "small",
          isRounded: true,
          class: "px-3"
        },
        {
          size: "x-small",
          isRounded: true,
          class: "px-2"
        }
      ]
    });
  }
  resolveBorderColor() {
    if (this.borderColor) {
      return this.borderColor;
    }
    if (this.backgroundColor) {
      return this.backgroundColor;
    }
  }
  render() {
    const tagStyles = this.tagStyles({
      size: this.size,
      isRounded: this.isRounded
    });
    return shared_tailwindElement_index.x`
      <div
        data-testid="tag"
        class=${tagStyles}
        style=${index$1.customStyleMap({
      [`background-color: var(--${this.backgroundColor})`]: !!this.backgroundColor,
      [`border-color: var(--${this.resolveBorderColor()})`]: !!this.resolveBorderColor(),
      [`color: var(--${this.textColor})`]: !!this.textColor
    })}
      >
        <slot></slot>
      </div>
    `;
  }
};
__decorateClass([
  queryAssignedElements.n({ type: String })
], exports.LuksoTag.prototype, "size", 2);
__decorateClass([
  queryAssignedElements.n({ type: Boolean, attribute: "is-rounded" })
], exports.LuksoTag.prototype, "isRounded", 2);
__decorateClass([
  queryAssignedElements.n({ type: String, attribute: "background-color" })
], exports.LuksoTag.prototype, "backgroundColor", 2);
__decorateClass([
  queryAssignedElements.n({ type: String, attribute: "border-color" })
], exports.LuksoTag.prototype, "borderColor", 2);
__decorateClass([
  queryAssignedElements.n({ type: String, attribute: "text-color" })
], exports.LuksoTag.prototype, "textColor", 2);
exports.LuksoTag = __decorateClass([
  queryAssignedElements.e("lukso-tag")
], exports.LuksoTag);
