@if(!count($sides))
    <span class="d-block no-suggest-items">No side effects!</span>
@else
    <div class="d-flex px-2 py-1 bg-white border-bottom align-items-baseline">
        <span>Count: <b>{{count($sides)}}</b></span>
        <a href="#" class="text-sm ml-auto" onclick="$(this).parent().next('table').toggle(); return false;">Toggle</a>
    </div>
    <table class="table table-sm table-striped table-bordered" style="display: none">
        <thead>
        <tr>
            <th>Side Effect</th>
            <th>Severity</th>
            <th>Frequency</th>
        </tr>
        </thead>
        <tbody>
        @foreach($sides as $side)
            <tr>
                <td class="font-weight-bold">{{$side->dxid_desc56}}</td>
                <td>{{$side->side_sev == 0 ? 'Not Severe' : 'Severe'}}</td>
                <td>{{$side->side_sev == 0 ? 'High' : ($side->side_sev == 1 ? 'Low' : 'Rare')}}</td>
            </tr>
        @endforeach
        </tbody>
    </table>
@endif

