import { toRef, createVNode, mergeProps } from "vue";
import "./styles/anchor.scss";
import { provideDefaults } from "../../composables/defaults/index.mjs";
import { makeNamedAnchor, useNamedAnchor } from "../../composables/named-anchor/index.mjs";
import { AnchorItem } from "./anchor-item.mjs";
import { defineComponent } from "../../utils/define-component.mjs";
const Anchor = defineComponent({
  name: "VeAnchor",
  props: {
    activeColor: {
      type: String,
      default: "primary"
    },
    items: Array,
    ...makeNamedAnchor()
  },
  setup(props, {
    slots
  }) {
    useNamedAnchor(props);
    provideDefaults({
      VeAnchorItem: {
        activeColor: toRef(props, "activeColor")
      }
    });
    return () => {
      var _a, _b;
      return createVNode("ul", {
        "class": "ve-anchor"
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots), (_b = props.items) == null ? void 0 : _b.map((item) => createVNode(AnchorItem, mergeProps({
        "key": item.value
      }, item), null))]);
    };
  }
});
export {
  Anchor
};
//# sourceMappingURL=anchor.mjs.map
