import { BvEvent } from '../../../utils/bv-event.class';
import { defineProperties, readonlyDescriptor } from '../../../utils/object';

class BvModalEvent extends BvEvent {
  constructor(type) {
    let eventInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    super(type, eventInit);
    // Freeze our new props as readonly, but leave them enumerable
    defineProperties(this, {
      trigger: readonlyDescriptor()
    });
  }
  static get Defaults() {
    return {
      ...super.Defaults,
      trigger: null
    };
  }
}

export { BvModalEvent };
