"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapEvent = wrapEvent;
const _1 = require("../Class/$");
const ObjectReadOnly_1 = require("../exception/ObjectReadOnly");
function wrapEvent(event, data, system) {
    const event_ = new (class Event_ extends _1.$ {
        constructor() {
            super(...arguments);
            this.__ = ['EV'];
        }
        read() {
            return data;
        }
        write(data) {
            throw new ObjectReadOnly_1.ReadOnlyError('event');
        }
        preventDefault() {
            event.preventDefault();
        }
        stopPropagation() {
            event.stopPropagation();
        }
    })(system);
    return event_;
}
//# sourceMappingURL=Event.js.map