import { defineComponent, resolveComponent, openBlock, createElementBlock, Fragment, mergeProps, createCommentVNode, createElementVNode, createBlock, withCtx, resolveDynamicComponent, renderSlot } from 'vue';
import { PsIcon } from '../../icon/index.mjs';
import '../../../hooks/index.mjs';
import { dropdownItemProps } from './dropdown.mjs';
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';

const _sfc_main = defineComponent({
  name: "DropdownItemImpl",
  components: {
    PsIcon
  },
  props: dropdownItemProps,
  setup() {
    const ns = useNamespace("dropdown");
    return {
      ns
    };
  }
});
const _hoisted_1 = ["aria-disabled"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ps_icon = resolveComponent("ps-icon");
  return openBlock(), createElementBlock(Fragment, null, [
    _ctx.divided ? (openBlock(), createElementBlock("li", mergeProps({
      key: 0,
      class: _ctx.ns.bem("menu", "item", "divided")
    }, _ctx.$attrs), null, 16)) : createCommentVNode("v-if", true),
    createElementVNode("li", mergeProps({ ..._ctx.dataset, ..._ctx.$attrs }, {
      "aria-disabled": _ctx.disabled,
      class: [_ctx.ns.be("menu", "item"), _ctx.ns.is("disabled", _ctx.disabled)],
      role: "menuitem"
    }), [
      _ctx.icon ? (openBlock(), createBlock(_component_ps_icon, { key: 0 }, {
        default: withCtx(() => [
          (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
        ]),
        _: 1
      })) : createCommentVNode("v-if", true),
      renderSlot(_ctx.$slots, "default")
    ], 16, _hoisted_1)
  ], 64);
}
var PsDropdownItemImpl = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/dropdown/src/dropdown-item-impl.vue"]]);

export { PsDropdownItemImpl as default };
//# sourceMappingURL=dropdown-item-impl.mjs.map
