'use strict';

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

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

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlFloatButtonGroup" },
  __name: "float-button-group",
  props: floatButton.floatButtonGroupProps,
  emits: ["click"],
  setup(__props, { emit: __emit }) {
    const attrs = vue.useAttrs();
    const bem = createNamespace.createNamespace("float-button-group");
    const emits = __emit;
    const handleClick = (item, index) => {
      emits("click", item, index);
    };
    return (_ctx, _cache) => {
      const _component_ll_float_button = vue.resolveComponent("ll-float-button");
      const _component_ll_back_top = vue.resolveComponent("ll-back-top");
      const _component_ll_icon = vue.resolveComponent("ll-icon");
      const _component_a_float_button_group = vue.resolveComponent("a-float-button-group");
      return vue.openBlock(), vue.createBlock(_component_a_float_button_group, vue.mergeProps({
        class: [
          vue.unref(bem).b(),
          _ctx.trigger !== "hover" && _ctx.trigger !== "click" ? "no-trigger" : ""
        ]
      }, vue.unref(attrs), { trigger: _ctx.trigger }), vue.createSlots({
        default: vue.withCtx(() => [
          _ctx.menus?.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
            vue.Fragment,
            { key: 0 },
            vue.renderList(_ctx.menus, (item, index) => {
              return vue.openBlock(), vue.createElementBlock(
                vue.Fragment,
                { key: index },
                [
                  item.componentType === "floatButton" ? (vue.openBlock(), vue.createBlock(_component_ll_float_button, vue.mergeProps({
                    key: 0,
                    ref_for: true
                  }, item, {
                    onClick: ($event) => handleClick(item, index)
                  }), null, 16, ["onClick"])) : item.componentType === "backTop" ? (vue.openBlock(), vue.createBlock(_component_ll_back_top, vue.mergeProps({
                    key: 1,
                    ref_for: true
                  }, item, {
                    onClick: ($event) => handleClick(item, index)
                  }), null, 16, ["onClick"])) : vue.createCommentVNode("v-if", true)
                ],
                64
                /* STABLE_FRAGMENT */
              );
            }),
            128
            /* KEYED_FRAGMENT */
          )) : vue.createCommentVNode("v-if", true)
        ]),
        _: 2
        /* DYNAMIC */
      }, [
        vue.renderList(Object.keys(_ctx.$slots).filter((key) => key !== "icon"), (item) => {
          return {
            name: item,
            fn: vue.withCtx((data) => [
              vue.renderSlot(_ctx.$slots, item, vue.normalizeProps(vue.guardReactiveProps(data || {})))
            ])
          };
        }),
        _ctx.icon.iconName || _ctx.$slots.icon ? {
          name: "icon",
          fn: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "icon", {}, () => [
              vue.createVNode(
                _component_ll_icon,
                vue.normalizeProps(vue.guardReactiveProps(_ctx.icon)),
                null,
                16
                /* FULL_PROPS */
              )
            ])
          ]),
          key: "0"
        } : void 0
      ]), 1040, ["class", "trigger"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=float-button-group.vue2.js.map
