import { __esDecorate, __runInitializers } from "tslib";
import { LitElement } from 'lit';
import { property } from 'lit/decorators.js';
let ApiElement = (() => {
    let _classSuper = LitElement;
    let _eventsTarget_decorators;
    let _eventsTarget_initializers = [];
    let _eventsTarget_extraInitializers = [];
    return class ApiElement extends _classSuper {
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            _eventsTarget_decorators = [property({ type: Object })];
            __esDecorate(this, null, _eventsTarget_decorators, { kind: "accessor", name: "eventsTarget", static: false, private: false, access: { has: obj => "eventsTarget" in obj, get: obj => obj.eventsTarget, set: (obj, value) => { obj.eventsTarget = value; } }, metadata: _metadata }, _eventsTarget_initializers, _eventsTarget_extraInitializers);
            if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        #eventsTarget_accessor_storage = __runInitializers(this, _eventsTarget_initializers, void 0);
        /**
         * Whenever the element wants to listen on global object
         * it uses this as a reference to it.
         *
         * @default window
         */
        get eventsTarget() { return this.#eventsTarget_accessor_storage; }
        set eventsTarget(value) { this.#eventsTarget_accessor_storage = value; }
        constructor() {
            super();
            __runInitializers(this, _eventsTarget_extraInitializers);
            this.eventsTarget = window;
        }
        /**
         * A common way for an element to notify a change.
         */
        notifyChange() {
            this.dispatchEvent(new Event('change'));
        }
    };
})();
/**
 * A base element for all elements in the UI library.
 * This allows to introduce global logic or properties for all elements.
 */
export default ApiElement;
//# sourceMappingURL=ApiElement.js.map