'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../../../utils/index.js');
var tag = require('./tag.js');
var createNamespace = require('../../../utils/create-namespace.js');

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlTag", inheritAttrs: false },
  __name: "tag",
  props: tag.tagProps,
  setup(__props) {
    const props = __props;
    const bem = createNamespace.createNamespace("tag");
    const attrs = vue.useAttrs();
    return (_ctx, _cache) => {
      const _component_ll_icon = vue.resolveComponent("ll-icon");
      const _component_a_tag = vue.resolveComponent("a-tag");
      return vue.openBlock(), vue.createBlock(_component_a_tag, vue.mergeProps(vue.unref(attrs), {
        class: [vue.unref(bem).b(), vue.unref(bem).is(props.shape)]
      }), vue.createSlots({
        default: vue.withCtx(() => [
          vue.renderSlot(_ctx.$slots, "default", {}, () => [
            vue.createTextVNode(
              vue.toDisplayString(props.label),
              1
              /* TEXT */
            )
          ])
        ]),
        _: 2
        /* DYNAMIC */
      }, [
        _ctx.$slots["icon"] || _ctx.icon.iconName ? {
          name: "icon",
          fn: vue.withCtx(() => [
            _ctx.$slots["icon"] ? vue.renderSlot(_ctx.$slots, "icon", { key: 0 }) : _ctx.icon.iconName ? (vue.openBlock(), vue.createBlock(_component_ll_icon, vue.mergeProps({ key: 1 }, _ctx.icon, {
              style: { order: _ctx.iconDirection === "left" ? 0 : 1 }
            }), null, 16, ["style"])) : vue.createCommentVNode("v-if", true)
          ]),
          key: "0"
        } : void 0,
        vue.renderList(Object.keys(_ctx.$slots).filter(
          (k) => k !== "default" && k !== "icon"
        ), (item) => {
          return {
            name: item,
            fn: vue.withCtx((data) => [
              vue.renderSlot(_ctx.$slots, item, vue.normalizeProps(vue.guardReactiveProps(data || {})))
            ])
          };
        })
      ]), 1040, ["class"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=tag.vue2.js.map
