{#
/**
 * Available Variables:
 * - node_image
 *
 * @see naomi_2025_preprocess_paragraph__()
 */
#}
{{ attach_library('naomi_2025/node.project.full') }}

{% set view_awards_by_project_has_result = drupal_view_result('content_awards', 'embed_by_project', node.id) %}

{% include "@ui-node/project/full/component/node.project.full.twig" with {
  node_field_label: label,
  node_field_ert_client: (content.field_ert_client.0) ? content.field_ert_client : '',
  node_field_display_title: (content.field_display_title.0) ? content.field_display_title.0['#context']['value'] : '',
  node_field_ert_expertise: (content.field_ert_expertise.0) ? content.field_ert_expertise : '',
  node_field_project_link: (content.field_project_link.0)
    ? link(content.field_project_link.0['#title'] ?? 'Visit the site', content.field_project_link.0['#url'])
    : '',
  node_field_project_type: (content.field_project_type.0) ? content.field_project_type.0['#markup'] : '',
  node_field_erp_sections: (content.field_erp_sections.0) ? content.field_erp_sections : '',
  node_field_tldr: (content.field_tldr.0) ? content.field_tldr : '',
  node_field_erp_statistic: (content.field_erp_statistic.0) ? content.field_erp_statistic : '',
  node_field_erm_page_image: (content.field_erm_page_image.0) ? content.field_erm_page_image : '',

  node_view_awards_by_project: (view_awards_by_project_has_result)
    ? drupal_view('content_awards', 'embed_by_project', node.id)
    : ''
} %}
