{{ attach_library('naomi_2025/node.story.full') }}

{% set view_stories_related_by_topic_has_result = topic_ids
  ? drupal_view_result('content_stories', 'embed_related_by_topic', topic_ids, node.id)
  : false
%}

{% include "@ui-node/story/full/component/node.story.full.twig" with {
  node_field_label: label,
  node_field_subtitle: (content.field_subtitle.0) ? content.field_subtitle : '',
  node_field_ert_story_type: (content.field_ert_story_type.0) ? content.field_ert_story_type : '',
  node_field_published_date: (content.field_published_date.0) ? content.field_published_date : '',
  node_field_updated_date: (content.field_updated_date.0) ? content.field_updated_date : '',
  node_field_ern_related_people: (content.field_ern_related_people.0) ? content.field_ern_related_people|field_value : '',
  node_field_summary: (content.field_summary.0) ? content.field_summary : '',
  node_field_erp_sections: (content.field_erp_sections.0) ? content.field_erp_sections : '',

  node_topics: node_topics,
  node_view_stories_related_by_topic: (view_stories_related_by_topic_has_result)
    ? drupal_view('content_stories', 'embed_related_by_topic', topic_ids, node.id)
    : '',
} %}
