import AbstractJDLOption from './abstract-jdl-option.js';
import { join } from '../utils/set-utils.js';
export default class JDLUnaryOption extends AbstractJDLOption {
    getType() {
        return 'UNARY';
    }
    toString() {
        const entityNames = join(this.entityNames, ', ');
        entityNames.slice(1, entityNames.length - 1);
        const firstPart = `${this.name} ${entityNames}`;
        if (this.excludedNames.size === 0) {
            return firstPart;
        }
        const excludedNames = join(this.excludedNames, ', ');
        excludedNames.slice(1, this.excludedNames.size - 1);
        return `${firstPart} except ${excludedNames}`;
    }
}
