@php
  $lang = apply_filters('wpml_current_language', NULL);
  $content = get_the_content();
  $description_localized = get_post_meta($post->ID, 'description_' . $lang, true);

  if ($description_localized) {
    $content = $description_localized;
  }

@endphp


<div class="additional">
  @php
    $usage = get_the_terms($post->ID,'intended_use');
  @endphp
  @if($usage)
    <div class="accordions decors accordion-wrapper">
        <div class="accordion-single">
            <div class="title">
                <h3>
                    {!! __('Intended uses', 'thor') !!}
                </h3>
                    <div class="detail">
                        @svg('images/more.svg')
                    </div>
            </div>
            <div class="content-accordion">
              @foreach($usage as $key => $term)
                <p>{!! $term->name !!}</p>
              @endforeach
            </div>
        </div>
    </div>
  @endif
  @if(!trim(str_replace('&nbsp;','',strip_tags(get_the_content()))) == '')
    <div class="accordions decors accordion-wrapper">
        <div class="accordion-single">
          <div class="title">
              <h3>
                  {!! __('Description', 'thor') !!}
              </h3>
              <div class="detail">
                  @svg('images/more.svg')
              </div>
          </div>
          <div class="content-accordion">
            <div>
              {!! $content !!}
            </div>
          </div>
        </div>
    </div>
  @endif
</div>