import { computed, createVNode, mergeProps, isVNode } from "vue";
import "./styles/header.scss";
import { makeToolbarProps, filterToolbarProps, Toolbar } from "../toolbar/toolbar.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 Header = defineComponent({
  name: "VeHeader",
  props: {
    ...makeToolbarProps(),
    ...makeLayoutItemProps({
      position: "fixed",
      anchor: "top"
    })
  },
  setup(props, {
    slots
  }) {
    const {
      layoutItemStyles
    } = useLayoutItem(computed(() => ({
      position: props.position,
      anchor: props.anchor,
      size: props.height,
      active: props.modelValue,
      priority: props.priority
    })));
    return () => {
      const [toolbarProps] = filterToolbarProps(props);
      return createVNode(Toolbar, mergeProps(toolbarProps, {
        "class": ["ve-header"],
        "style": layoutItemStyles.value
      }), _isSlot(slots) ? slots : {
        default: () => [slots]
      });
    };
  }
});
export {
  Header
};
//# sourceMappingURL=header.mjs.map
