import { defineComponent, ref, createVNode } from 'vue';
import { addButtonProps } from '../props.mjs';

var AddButton = /* @__PURE__ */ defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "AddButton",
  inheritAttrs: false,
  props: addButtonProps(),
  setup(props, {
    expose,
    attrs
  }) {
    const domRef = ref();
    expose({
      domRef
    });
    return () => {
      const {
        prefixCls,
        editable,
        locale
      } = props;
      if (!editable || editable.showAdd === false)
        return null;
      return createVNode("button", {
        "ref": domRef,
        "type": "button",
        "class": `${prefixCls}-nav-add`,
        "style": attrs.style,
        "aria-label": (locale == null ? void 0 : locale.addAriaLabel) || "Add tab",
        "onClick": (event) => {
          editable.onEdit("add", {
            event
          });
        }
      }, [editable.addIcon ? editable.addIcon() : "+"]);
    };
  }
});

export { AddButton as default };
//# sourceMappingURL=AddButton.mjs.map
