/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { chain, schematic } from '@angular-devkit/schematics';
import { getPackageJsonDependency } from '@schematics/angular/utility/dependencies';
export const ngAdd = (options) => {
    return (tree, context) => {
        context.logger.info('🔧 Adding @siemens/element-ng to your project...');
        const hasSimplElementNgDependency = getPackageJsonDependency(tree, '@simpl/element-ng');
        if (hasSimplElementNgDependency) {
            const chainedRules = chain([schematic('simpl-siemens-migration', options)]);
            return chainedRules(tree, context);
        }
    };
};
