import { defineComponent as r, computed as n, openBlock as a, createBlock as i, resolveDynamicComponent as f, mergeProps as u, withCtx as d, createVNode as m, normalizeClass as l, createElementVNode as p, renderSlot as v } from "vue";
import x from "./Icon.js";
import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const k = /* @__PURE__ */ r({
  name: "ll-icon-label",
  __name: "IconLabel",
  props: {
    icon: {},
    color: { default: void 0 },
    href: { default: void 0 },
    to: { default: void 0 },
    stacked: { type: Boolean, default: !1 },
    truncate: { type: Boolean, default: !1 }
  },
  setup(t) {
    const e = t, s = n(() => e.to ? "router-link" : e.href ? "a" : "div"), c = n(() => e.to ? {
      to: e.to
    } : e.href ? {
      href: e.href
    } : {});
    return (o, B) => (a(), i(f(s.value), u(c.value, {
      class: ["flex", { "flex-col items-center": e.stacked }]
    }), {
      default: d(() => [
        m(x, {
          name: e.icon,
          size: "dense",
          class: l([o.$style.icon, { [`text-${t.color}`]: !!t.color }])
        }, null, 8, ["name", "class"]),
        p("div", {
          class: l({
            "ml-1.5 flex-1": !e.stacked,
            "mt-1.5 text-xs leading-3": e.stacked,
            truncate: t.truncate
          })
        }, [
          v(o.$slots, "default")
        ], 2)
      ]),
      _: 3
    }, 16, ["class"]));
  }
}), y = "_icon_WEv2G", _ = {
  icon: y
}, b = {
  $style: _
}, g = /* @__PURE__ */ h(k, [["__cssModules", b]]);
export {
  g as default
};
//# sourceMappingURL=IconLabel.js.map
