async function isGenerationConditionMet (
  templateConfig,
  matchedConditionPath,
  templateParams,
  asyncapiDocument 
) {
  const conditionFilesGeneration = templateConfig?.conditionalFiles?.[matchedConditionPath] || {};
  const conditionalGeneration = templateConfig?.conditionalGeneration?.[matchedConditionPath] || {};

  const config = Object.keys(conditionFilesGeneration).length > 0 
    ? conditionFilesGeneration 
    : conditionalGeneration;

  const subject = config?.subject;

  // conditionalFiles becomes deprecated with this PR, and soon will be removed.
  // TODO: https://github.com/asyncapi/generator/issues/1553
  if (Object.keys(conditionFilesGeneration).length > 0 && subject) {
    return conditionalFilesGenerationDeprecatedVersion(
      asyncapiDocument,
      templateConfig,
      matchedConditionPath,
      templateParams
    );
  } else if (Object.keys(conditionalGeneration).length > 0) {
    // Case when the subject is present in conditionalGeneration
    if (subject) {
      return conditionalSubjectGeneration(
        asyncapiDocument,
        templateConfig,
        matchedConditionPath
      );
    }
    return conditionalParameterGeneration(templateConfig,matchedConditionPath,templateParams);
  }
}
Determines whether the generation of a file or folder should be skipped
based on conditions defined in the template configuration.

@param {Object} templateConfig - The template configuration containing conditional logic.
@param {string} matchedConditionPath - The matched path used to find applicable conditions.
@param {Object} templateParams - Parameters passed to the template.
@param {AsyncAPIDocument} asyncapiDocument - The AsyncAPI document used for evaluating conditions.
@returns {Promise<boolean>} A promise that resolves to `true` if the condition is met, allowing the file or folder to render; otherwise, resolves to `false`.