/**
 * ldesign v0.3.13
 * (c) 2023 ldesign
 * @license MIT
 */

import { i as isFunction_1 } from '../_chunks/dep-5717e263.mjs';
import { i as isString_1 } from '../_chunks/dep-876fb3ec.mjs';
import { getPropsApiByEvent } from './helper.mjs';
import '../_chunks/dep-eba0ea6e.mjs';
import '../_chunks/dep-469b4ae0.mjs';
import '../_chunks/dep-255303ba.mjs';
import '../_chunks/dep-a8bcacea.mjs';
import '../_chunks/dep-b57180d0.mjs';
import '../_chunks/dep-c8d7b6b4.mjs';
import '../_chunks/dep-3da99438.mjs';
import '../_chunks/dep-60fae668.mjs';
import '../_chunks/dep-84acf3c2.mjs';
import '../_chunks/dep-b8d7992c.mjs';
import '../_chunks/dep-2db7b3ec.mjs';
import '../_chunks/dep-406cd044.mjs';
import '../_chunks/dep-42cc3015.mjs';
import '../_chunks/dep-2bc37d52.mjs';
import '../_chunks/dep-327559e8.mjs';
import '../_chunks/dep-b2235f26.mjs';
import '../_chunks/dep-8b989474.mjs';
import '../_chunks/dep-1372b2d3.mjs';
import '../_chunks/dep-78847b2e.mjs';
import '../_chunks/dep-ed5ebb35.mjs';
import '../_chunks/dep-3f21269a.mjs';

function emitEvent(vm, eventName) {
  var _vm$$props;
  var emitEventMethodName;
  if (isString_1(eventName)) emitEventMethodName = getPropsApiByEvent(eventName);
  for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
    args[_key - 2] = arguments[_key];
  }
  if (isFunction_1(vm.$props[emitEventMethodName])) (_vm$$props = vm.$props)[emitEventMethodName].apply(_vm$$props, args);else vm.$emit.apply(vm, [eventName].concat(args));
}

export { emitEvent };
//# sourceMappingURL=event.mjs.map
