import JDLObject from '../core/models/jdl-object.js';
import { unaryOptions } from '../core/built-in-options/index.js';
import JDLUnaryOption from '../core/models/jdl-unary-option.js';
const { SKIP_CLIENT, SKIP_SERVER } = unaryOptions;
export default {
    convertServerOptionsToJDL,
};
export function convertServerOptionsToJDL(config, jdl) {
    const jdlObject = jdl || new JDLObject();
    const jhipsterConfig = config || {};
    [SKIP_CLIENT, SKIP_SERVER].forEach(option => {
        if (jhipsterConfig[option] === true) {
            jdlObject.addOption(new JDLUnaryOption({
                name: option,
            }));
        }
    });
    return jdlObject;
}
