import needleBase from '../../needle-base.mjs';
export default class extends needleBase {
    addStyle(style, comment, filePath, needle) {
        const content = this._mergeStyleAndComment(style, comment);
        this.addBlockContentToFile({ file: filePath, needle, splicable: content, regexp: `\n${style}\n`, prettierAware: true }, 'Style not added to JHipster app.\n');
    }
    _mergeStyleAndComment(style, comment) {
        let styleBlock = '';
        if (comment) {
            styleBlock += '/* ==========================================================================\n';
            styleBlock += `${comment}\n`;
            styleBlock += '========================================================================== */\n';
        }
        styleBlock += `${style}\n`;
        return styleBlock;
    }
}
