import { createVNode as _createVNode, isVNode as _isVNode } from "vue";
import "./styles/layout.css";
import { useRender } from "@veno-ui/utils";
import { defineComponent } from "../../utils";
import { makeTagProps } from "../../composables/tag";
import { makeLayoutProps, provideLayout } from "../../composables/layout";
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
