import { javaMainPackageTemplatesBlock, javaTestPackageTemplatesBlock } from './support/index.mjs';
import { checkRegenerateAbsoluteFile } from '../base/support/index.mjs';
export const entityServerFiles = {
    model: [
        javaMainPackageTemplatesBlock({
            override(context) {
                return checkRegenerateAbsoluteFile(this, context.begcodeData && context.begcodeData.destinationFile);
            },
            templates: ['_entityPackage_/domain/_persistClass_.java.jhi', '_entityPackage_/domain/_persistClass_.java.jhi.extends_impl'],
        }),
    ],
    modelTestFiles: [
        javaTestPackageTemplatesBlock({
            templates: ['_entityPackage_/domain/_persistClass_Test.java'],
        }),
    ],
    server: [
        javaMainPackageTemplatesBlock({
            condition: ctx => ctx.useJakartaValidation,
            templates: ['_entityPackage_/domain/_persistClass_.java.jhi.jakarta_validation'],
        }),
    ],
};
export const enumFiles = {
    enumFiles: [
        javaMainPackageTemplatesBlock({
            renameTo: (data, filepath) => filepath.replace('_enumName_', data.enumName).replace('_entityPackage_/', ''),
            templates: ['_entityPackage_/domain/enumeration/_enumName_.java'],
        }),
    ],
};
