import { defineComponent as _, useSlots as b, computed as c, openBlock as n, createElementBlock as o, normalizeClass as r, unref as a, createElementVNode as i, toDisplayString as m, renderSlot as p, createCommentVNode as x } from "vue";
import { uniqueId as f } from "es-toolkit/compat";
var s = /* @__PURE__ */ ((e) => (e.Small = "small", e.Standard = "standard", e))(s || {}), l = /* @__PURE__ */ ((e) => (e.Accent = "accent", e.Naked = "naked", e))(l || {});
const S = ["id"], k = ["aria-labelledby"], y = {
  key: 0,
  class: "stash-metric__secondary mt-1 text-xs text-ice-700",
  "data-test": "stash-metric|secondary"
}, g = /* @__PURE__ */ _({
  __name: "Metric",
  props: {
    value: {},
    label: {},
    variant: { default: "naked" },
    accentColor: { default: "teal-500" },
    size: { default: "standard" }
  },
  setup(e) {
    const t = e, u = b(), d = c(() => f("metric-")), h = c(() => String(t.value));
    return (v, z) => (n(), o("div", {
      class: r(["stash-metric", [
        `stash-metric--${t.size}`,
        {
          "stash-metric--naked": t.variant === a(l).Naked,
          [`stash-metric--accent border-${e.accentColor} rounded border-l-12 bg-white p-3 shadow`]: t.variant === a(l).Accent
        }
      ]]),
      "data-test": "stash-metric"
    }, [
      i("div", {
        id: d.value,
        class: r(["stash-metric__label mb-1 text-ice-700", [
          {
            "text-xs": t.size === a(s).Small,
            "text-sm": t.size === a(s).Standard
          }
        ]]),
        "data-test": "stash-metric|label"
      }, m(t.label), 11, S),
      i("div", {
        "aria-labelledby": d.value,
        class: r(["stash-metric__value font-medium text-ice-900", {
          "text-base": t.size === a(s).Small,
          "text-2xl": t.size === a(s).Standard
        }]),
        "data-test": "stash-metric|value"
      }, m(h.value), 11, k),
      a(u).secondary ? (n(), o("div", y, [
        p(v.$slots, "secondary")
      ])) : x("", !0)
    ], 2));
  }
});
export {
  s as MetricSizes,
  l as MetricVariants,
  g as default
};
//# sourceMappingURL=Metric.js.map
