{# field_content #}

{#
  Before including a block with content,
  it needs to be declared:

  {% set copy_to_clipboard = True %}

  so that the fields have a complex layout that includes markup
  for the option to copy the contents of the field to the clipboard.

  ! Enabling this option for PDF is highly not recommended.
 #}

{%- if copy_to_clipboard is defined -%}
<sdoc-field data-controller="copy_to_clipboard">
  <sdoc-field-content>
    <sdoc-autogen>{{ field_content }}</sdoc-autogen>
  </sdoc-field-content>
  <sdoc-field-service>

    <div class="copy_to_clipboard">
      <div class="copy_to_clipboard-cover">
        <div title="Click to copy" class="copy_to_clipboard-button action_button">
          <span style="display: contents;" class="copy_to_clipboard-copy_icon">
            {% include "_res/svg_ico16_copy.jinja" %}
          </span>
          <span style="display: none;" class="copy_to_clipboard-done_icon">
            {% include "_res/svg_ico16_done.jinja" %}
          </span>
        </div>
      </div>
    </div>

  </sdoc-field-service>
</sdoc-field>
{%- else -%}
<sdoc-autogen>{{ field_content }}</sdoc-autogen>
{%- endif -%}
