import { defineComponent as a, useAttrs as u, computed as l, withDirectives as d, openBlock as p, createBlock as h, mergeProps as m, withCtx as C, createTextVNode as f, toDisplayString as b, vShow as A } from "vue";
import g from "./Chip.js";
const _ = /* @__PURE__ */ a({
  name: "ll-license-chip",
  inheritAttrs: !1,
  __name: "LicenseChip",
  props: {
    license: {},
    size: { default: "medium" },
    disabled: { type: Boolean }
  },
  setup(r) {
    const s = r, c = u(), n = l(() => {
      const e = { ...c };
      return delete e["color-scheme"], delete e.radius, delete e.shade, e;
    }), i = Object.freeze({
      MED: "yellow",
      MEDI: "yellow",
      REC: "blue",
      RECR: "blue",
      COM: "royal",
      COMB: "royal",
      ANC: "orange",
      ANCI: "orange",
      BUL: "ice",
      BULK: "ice",
      CAN: "green",
      CANN: "green",
      ADU: "blue",
      ADUL: "blue"
    }), o = l(() => s.disabled ? "ice" : t.value in i ? i[t.value] : "blue"), t = l(() => {
      const e = s.license.toUpperCase();
      return e.length > 4 ? e.slice(0, 3) : e;
    });
    return (e, v) => d((p(), h(g, m({
      class: "stash-license-chip",
      "data-test": "stash-license-chip",
      radius: "pill",
      shade: "main",
      "color-scheme": o.value,
      size: s.size
    }, n.value, { disabled: r.disabled }), {
      default: C(() => [
        f(b(t.value), 1)
      ]),
      _: 1
    }, 16, ["color-scheme", "size", "disabled"])), [
      [A, t.value.length]
    ]);
  }
});
export {
  _ as default
};
//# sourceMappingURL=LicenseChip.js.map
