import { createVNode as _createVNode, isVNode as _isVNode } from "vue";
import "./styles/layout-item.css";
import { computed } from "vue";
import { defineComponent } from "../../utils";
import { makeLayoutItemProps, useLayoutItem } from "../../composables/layout";
import { makeTagProps } from "../../composables/tag";
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
