import { L as attachComponentToConfig, M as detachComponentFromConfig } from './config.utils.js';

function ListenToConfig() {
    return function (target, _propertyKey, _descriptor) {
        const { connectedCallback, disconnectedCallback } = target;
        target.connectedCallback = function () {
            attachComponentToConfig(this);
            return connectedCallback && connectedCallback.call(this);
        };
        target.disconnectedCallback = function () {
            detachComponentFromConfig(this);
            return disconnectedCallback && disconnectedCallback.call(this);
        };
    };
}

export { ListenToConfig as L };
