function _define_property(obj, key, value) {
    if (key in obj) Object.defineProperty(obj, key, {
        value: value,
        enumerable: true,
        configurable: true,
        writable: true
    });
    else obj[key] = value;
    return obj;
}
class TrackingManager {
    async logEvent(type, key, values) {
        const data = {
            type,
            key,
            values
        };
        await this.api.resource('instrumentation').create({
            values: {
                ...data
            }
        });
    }
    constructor(app){
        _define_property(this, "app", void 0);
        _define_property(this, "api", void 0);
        this.app = app;
        this.api = this.app.apiClient;
    }
}
export { TrackingManager };
