'use strict';

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

var vue = require('vue');
require('../../../utils/index.cjs');
var context = require('./context.cjs');
var Item = require('./Item.cjs');
var vueTypes = require('../../../utils/vue/vueTypes.cjs');
var _class = require('../../../utils/dom/class.cjs');

var RawItem = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: false,
  props: {
    component: vueTypes.default.any,
    title: vueTypes.default.any,
    id: String,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onClick: {
      type: Function
    },
    onKeydown: {
      type: Function
    },
    onFocus: {
      type: Function
    },
    role: String,
    tabindex: Number
  },
  setup(props, {
    slots,
    attrs
  }) {
    const context$1 = context.useInjectOverflowContext();
    return () => {
      if (!context$1.value) {
        const {
          component: Component = "div",
          ...restProps2
        } = props;
        return vue.createVNode(Component, {
          ...restProps2,
          ...attrs
        }, {
          default: () => {
            var _a;
            return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
          }
        });
      }
      const {
        className: contextClassName,
        ...restContext
      } = context$1.value;
      const {
        class: className,
        ...restProps
      } = attrs;
      return vue.createVNode(context.OverflowContextProvider, {
        "value": null
      }, {
        default: () => [vue.createVNode(Item.default, {
          "class": _class.classNames(contextClassName, className),
          ...restContext,
          ...restProps,
          ...props
        }, slots)]
      });
    };
  }
});

exports.default = RawItem;
//# sourceMappingURL=RawItem.cjs.map
