export const mutateUserManagementApplication = {
    __override__: false,
    generateAuthenticationApi: data => data.applicationType !== 'microservice',
    authenticationTypeUsesRemoteAuthorization: data => data.authenticationType === 'oauth2',
    skipUserManagement: data => !data.generateAuthenticationApi || data.authenticationTypeUsesRemoteAuthorization || data.databaseType === 'no',
    generateUserManagement: data => !data.skipUserManagement && data.generateAuthenticationApi,
    syncUserWithIdp: data => Boolean((data.backendType ?? 'Java') === 'Java' &&
        data.authenticationType === 'oauth2' &&
        data.databaseType !== 'no' &&
        (data.applicationType === 'gateway' || data.anyEntityHasRelationshipWithUser)),
    generateBuiltInUserEntity: ({ generateUserManagement, syncUserWithIdp }) => generateUserManagement || syncUserWithIdp,
    generateBuiltInAuthorityEntity: ({ generateBuiltInUserEntity, databaseType }) => generateBuiltInUserEntity && databaseType !== 'cassandra',
};
export const mutateApplication = {
    ...mutateUserManagementApplication,
    javaNodeBuildPaths: () => [],
    entitySuffix: '',
    dtoSuffix: 'DTO',
};
