'use strict';

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

var vue = require('vue');
require('../../../utils/index.js');
var dropdown = require('./dropdown.js');
require('./recursive-menu.vue.js');
var createNamespace = require('../../../utils/create-namespace.js');
var recursiveMenu_vue_vue_type_script_setup_true_lang = require('./recursive-menu.vue2.js');

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlDropdown" },
  __name: "dropdown",
  props: dropdown.dropdownProps,
  emits: dropdown.dropdownEmits,
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const bem = createNamespace.createNamespace("dropdown");
    const attrs = vue.useAttrs();
    const handleMenuItemClick = (item) => {
      if (!item.disabled) {
        emits("claimSelected", item);
      }
    };
    return (_ctx, _cache) => {
      const _component_a_menu = vue.resolveComponent("a-menu");
      const _component_a_dropdown = vue.resolveComponent("a-dropdown");
      return vue.openBlock(), vue.createBlock(_component_a_dropdown, vue.mergeProps(vue.unref(attrs), {
        "overlay-class-name": `${_ctx.overlayClassName} ${vue.unref(bem).b("menu-wrapper")}`,
        class: vue.unref(bem).b()
      }), {
        overlay: vue.withCtx(() => [
          _ctx.$slots.overlay ? vue.renderSlot(_ctx.$slots, "overlay", { key: 0 }) : (vue.openBlock(), vue.createBlock(_component_a_menu, { key: 1 }, {
            default: vue.withCtx(() => [
              vue.createVNode(recursiveMenu_vue_vue_type_script_setup_true_lang.default, {
                items: props.dropdownItems,
                onClaimSelected: handleMenuItemClick
              }, null, 8, ["items"])
            ]),
            _: 1
            /* STABLE */
          }))
        ]),
        default: vue.withCtx(() => [
          vue.renderSlot(_ctx.$slots, "default")
        ]),
        _: 3
        /* FORWARDED */
      }, 16, ["overlay-class-name", "class"]);
    };
  }
});

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