import { createVNode as _createVNode, isVNode as _isVNode, mergeProps as _mergeProps } from "vue";
import "./styles/header.css";
import { computed } from "vue";
import { defineComponent } from "../../utils";
import { makeLayoutItemProps, useLayoutItem } from "../../composables/layout";
import { filterToolbarProps, makeToolbarProps } from "../toolbar/toolbar";
import { Toolbar } from "../toolbar";
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
