'use strict';

var config_utils = require('./config.utils-Civnz2jT.js');

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

exports.ListenToConfig = ListenToConfig;
