import { defineComponent, createVNode } from 'vue';
import '../../../utils/index.mjs';
import { useInjectOverflowContext, OverflowContextProvider } from './context.mjs';
import Item from './Item.mjs';
import PropTypes from '../../../utils/vue/vueTypes.mjs';
import { classNames } from '../../../utils/dom/class.mjs';

var RawItem = /* @__PURE__ */ defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: false,
  props: {
    component: PropTypes.any,
    title: PropTypes.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 = useInjectOverflowContext();
    return () => {
      if (!context.value) {
        const {
          component: Component = "div",
          ...restProps2
        } = props;
        return createVNode(Component, {
          ...restProps2,
          ...attrs
        }, {
          default: () => {
            var _a;
            return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
          }
        });
      }
      const {
        className: contextClassName,
        ...restContext
      } = context.value;
      const {
        class: className,
        ...restProps
      } = attrs;
      return createVNode(OverflowContextProvider, {
        "value": null
      }, {
        default: () => [createVNode(Item, {
          "class": classNames(contextClassName, className),
          ...restContext,
          ...restProps,
          ...props
        }, slots)]
      });
    };
  }
});

export { RawItem as default };
//# sourceMappingURL=RawItem.mjs.map
