import { globalDefine, isBlank } from '@jscrpt/common';
globalDefine(global => {
    if (isBlank(global.ngDesignerMetadata)) {
        global.ngDesignerMetadata = true;
    }
});
//TODO: rework also with symbol
/**
 * Sets dynamic metadata to class on which is this decorator applied
 * @param metadataLoader - Metadata loader function used for obtaining metadata
 * @param propertyName - Name of property where will be metadata instance stored
 */
export function DynamicClassMetadata(metadataLoader, propertyName) {
    if (ngDesignerMetadata) {
        return function (target) {
            target[propertyName] = metadataLoader();
            return target;
        };
    }
    return function (target) {
        return target;
    };
}
//# sourceMappingURL=dynamicClassMetadata.decorator.js.map