export function updateLanguagesInMailServiceITTask({ application, control }) {
    const { javaPackageTestDir, languagesDefinition } = application;
    const { ignoreNeedlesError: ignoreNonExisting } = control;
    let newContent = 'private static final String[] languages = {\n';
    languagesDefinition?.forEach((language, i) => {
        newContent += `        "${language.languageTag}"${i !== languagesDefinition.length - 1 ? ',' : ''}\n`;
    });
    newContent += '        // jhipster-needle-i18n-language-constant - JHipster will add/remove languages in this array\n    };';
    this.editFile(`${javaPackageTestDir}/service/MailServiceIT.java`, { ignoreNonExisting }, content => content.replace(/private.*static.*String.*languages.*\{([^}]*jhipster-needle-i18n-language-constant[^}]*)\};/g, newContent));
}
export default function updateLanguagesTask(taskParam) {
    updateLanguagesInMailServiceITTask.call(this, taskParam);
}
