"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const event = require("../../../constants/event.js");
const shared_esmBundler = require("../../../../../@vue/shared/dist/shared.esm-bundler.js");
const runtime = require("../../../utils/vue/props/runtime.js");
const content = require("../../tooltip/src/content.js");
const input = require("../../input/src/input.js");
const helper = require("./helper.js");
const mentionProps = runtime.buildProps({
  ...input.inputProps,
  options: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  prefix: {
    type: runtime.definePropType([String, Array]),
    default: "@",
    validator: (val) => {
      if (shared_esmBundler.isString(val)) return val.length === 1;
      return val.every((v) => shared_esmBundler.isString(v) && v.length === 1);
    }
  },
  split: {
    type: String,
    default: " ",
    validator: (val) => val.length === 1
  },
  filterOption: {
    type: runtime.definePropType([Boolean, Function]),
    default: () => helper.filterOption,
    validator: (val) => {
      if (val === false) return true;
      return shared_esmBundler.isFunction(val);
    }
  },
  placement: {
    type: runtime.definePropType(String),
    default: "bottom"
  },
  showArrow: Boolean,
  offset: {
    type: Number,
    default: 0
  },
  whole: Boolean,
  checkIsWhole: { type: runtime.definePropType(Function) },
  modelValue: String,
  loading: Boolean,
  popperClass: content.useTooltipContentProps.popperClass,
  popperStyle: content.useTooltipContentProps.popperStyle,
  popperOptions: {
    type: runtime.definePropType(Object),
    default: () => ({})
  },
  props: {
    type: runtime.definePropType(Object),
    default: () => mentionDefaultProps
  }
});
const mentionEmits = {
  [event.UPDATE_MODEL_EVENT]: (value) => shared_esmBundler.isString(value),
  "whole-remove": (pattern, prefix) => shared_esmBundler.isString(pattern) && shared_esmBundler.isString(prefix),
  input: (value) => shared_esmBundler.isString(value),
  search: (pattern, prefix) => shared_esmBundler.isString(pattern) && shared_esmBundler.isString(prefix),
  select: (option, prefix) => shared_esmBundler.isObject(option) && shared_esmBundler.isString(prefix),
  focus: (evt) => evt instanceof FocusEvent,
  blur: (evt) => evt instanceof FocusEvent
};
const mentionDefaultProps = {
  value: "value",
  label: "label",
  disabled: "disabled"
};
exports.mentionDefaultProps = mentionDefaultProps;
exports.mentionEmits = mentionEmits;
exports.mentionProps = mentionProps;
