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

import { i as isFunction_1 } from '../_chunks/dep-6b22dd27.mjs';
import { i as isString_1 } from '../_chunks/dep-1cf2b129.mjs';
import { getPropsApiByEvent } from './helper.mjs';
import '../_chunks/dep-a0b4a044.mjs';
import '../_chunks/dep-c959a6fb.mjs';
import '../_chunks/dep-b4041200.mjs';
import '../_chunks/dep-0f0c89ff.mjs';
import '../_chunks/dep-e3b14d70.mjs';
import '../_chunks/dep-66d6733b.mjs';
import '../_chunks/dep-c31e1d9e.mjs';
import '../_chunks/dep-b6a73f93.mjs';
import '../_chunks/dep-55846619.mjs';
import '../_chunks/dep-cfcedf47.mjs';
import '../_chunks/dep-eb20e23f.mjs';
import '../_chunks/dep-f6649a46.mjs';
import '../_chunks/dep-37ba476d.mjs';
import '../_chunks/dep-be27d184.mjs';
import '../_chunks/dep-1fe0ad42.mjs';
import '../_chunks/dep-d54f2690.mjs';
import '../_chunks/dep-59c8420d.mjs';
import '../_chunks/dep-74848b92.mjs';
import '../_chunks/dep-30451c48.mjs';
import '../_chunks/dep-6f89b77e.mjs';
import '../_chunks/dep-6eea369f.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
