import { EventTypes } from './EventTypes.js';
import { ApiStoreContextEvent } from './BaseEvents.js';
export const ApiEvents = {
    /**
     * Reads basic info about the API.
     * @param target The node on which to dispatch the event
     */
    summary: async (target) => {
        const e = new ApiStoreContextEvent(EventTypes.Api.summary);
        target.dispatchEvent(e);
        return e.detail.result;
    },
    /**
     * Reads the current API's protocols.
     * @param target The node on which to dispatch the event
     */
    protocols: async (target) => {
        const e = new ApiStoreContextEvent(EventTypes.Api.protocols);
        target.dispatchEvent(e);
        return e.detail.result;
    },
    /**
     * Reads the current API's version.
     * @param target The node on which to dispatch the event
     */
    version: async (target) => {
        const e = new ApiStoreContextEvent(EventTypes.Api.version);
        target.dispatchEvent(e);
        return e.detail.result;
    },
    /**
     * Reads the meta information about the currently loaded document from the store.
     * @param target The node on which to dispatch the event
     */
    documentMeta: async (target) => {
        const e = new ApiStoreContextEvent(EventTypes.Api.documentMeta);
        target.dispatchEvent(e);
        return e.detail.result;
    },
};
Object.freeze(ApiEvents);
//# sourceMappingURL=ApiEvents.js.map