<?php
if (!$section->sectionTemplate->is_page_driven) {
    $trimmed = trim(strip_tags($section->summary_html));
}
?>
<?php
if ($section->sectionTemplate->is_page_driven || ($trimmed !== '' && $trimmed !== '-')):
?>
<div class="p-3 note-section events-none">
    <div class="d-flex align-items-start">
        <span class="font-weight-bold mb-2 d-flex align-items-center">
            {{$section->sectionTemplate->title}}
        </span>
        <?php $sectionInternalName = $section->sectionTemplate->internal_name; ?>
    </div>

    <div class="inset-comment summary-container">
        <?php if ($section->sectionTemplate->is_page_driven): ?>
            @include("app.patient.page-sections.{$sectionInternalName}.summary")
        <?php else: ?>
            <?php
            if($trimmed !== '' && $trimmed !== '-'):
                ?>
                {!! $section->summary_html !!}
                <?php
            endif;
            ?>
        <?php endif; ?>
    </div>

</div>
<?php endif; ?>

