import { createVNode, isVNode } from "vue";
import "./styles/layout.scss";
import { makeTagProps } from "../../composables/tag/index.mjs";
import { makeLayoutProps, provideLayout } from "../../composables/layout/layout.mjs";
import { defineComponent } from "../../utils/define-component.mjs";
import { useRender } from "../../utils/dist/index.mjs";
function _isSlot(s) {
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
}
const Layout = defineComponent({
  name: "VeLayout",
  props: {
    ...makeTagProps(),
    ...makeLayoutProps()
  },
  setup(props, {
    slots
  }) {
    const {
      layoutClasses,
      getLayoutItem,
      items
    } = provideLayout(props);
    useRender(() => createVNode(props.tag, {
      "class": ["ve-layout", layoutClasses.value]
    }, _isSlot(slots) ? slots : {
      default: () => [slots]
    }));
    return {
      getLayoutItem,
      items
    };
  }
});
export {
  Layout
};
//# sourceMappingURL=layout.mjs.map
