import { computed, createVNode, isVNode } from "vue";
import "./styles/layout-item.scss";
import { makeTagProps } from "../../composables/tag/index.mjs";
import { makeLayoutItemProps, useLayoutItem } from "../../composables/layout/layout-item.mjs";
import { defineComponent } from "../../utils/define-component.mjs";
function _isSlot(s) {
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
}
const LayoutItem = defineComponent({
  name: "VeLayoutItem",
  props: {
    size: {
      type: [String, Number],
      default: 64
    },
    ...makeTagProps(),
    ...makeLayoutItemProps()
  },
  setup(props, {
    slots
  }) {
    const {
      layoutItemStyles
    } = useLayoutItem(computed(() => ({
      priority: props.priority,
      position: props.position,
      anchor: props.anchor,
      size: props.size,
      active: props.modelValue
    })));
    return () => createVNode(props.tag, {
      "class": ["ve-layout-item"],
      "style": layoutItemStyles.value
    }, _isSlot(slots) ? slots : {
      default: () => [slots]
    });
  }
});
export {
  LayoutItem
};
//# sourceMappingURL=layout-item.mjs.map
