<table data-position="{{ @$position }}" class="table table-sm table-striped border-top p-0 m-0">
	<thead class="bg-light">
		<tr>
			<th class="border-0">Display title</th>
			<th class="border-0">Heading</th>
			<th class="border-0">Sub-heading</th>
			<th class="border-0">Segment Template</th>
			<th class="border-0">Left/Right</th>
			<th class="border-0">Status</th>
			<th class="border-0">&nbsp;</th>
		</tr>
	</thead>
	<tbody>
		<?php $rowsCount = 0; ?>
		@foreach($visitTemplateSegmentTemplates as $template)
			@if(!$template->is_active)
				<?php $rowsCount++; ?>
				<tr draggable="true" data-uid="{{ $template->uid }}" draggable-item>
					<td><i class="fas fa-arrows-alt mr-2"></i> {{ $template->display_title }}</td>
					<td>{{ $template->heading }}</td>
					<td>{{ $template->subheading }}</td>
					<td>{{ $template->segmentTemplate ? $template->segmentTemplate->default_display_title : '---' }}</td>
					<td>{{ $template->left_or_right }}</td>
					<td>
						<div>
							@if($template->is_active)
							<span class="text-success">ACTIVE</span>
							@if($template->reactivation_memo)
							<div style="width:300px;">
								<small class="text-muted"><b>Memo: </b>{{ $template->reactivation_memo }}</small>
								@include('app.practice-management.visit-templates.visit-template-segment-templates.update-memo')
							</div>
							@endif
							@else
							<span class="text-danger">INACTIVE</span>
							@if($template->deactivation_memo)
							<div style="width:300px;">
								<small class="text-muted"><b>Memo: </b>{{ $template->deactivation_memo }}</small>
								@include('app.practice-management.visit-templates.visit-template-segment-templates.update-memo')
							</div>
							@endif
							@endif
						</div>
					</td>
					<td>
						<div class="d-flex align-items-center">
							<div class="mr-2">
								@include('app.practice-management.visit-templates.visit-template-segment-templates.update', ['position' => @$position])
							</div>
							<div>
								@include('app.practice-management.visit-templates.visit-template-segment-templates.activate-deactivate')
							</div>
						</div>
					</td>
				</tr>
			@endif
		@endforeach
		@if(!$rowsCount)
		<tr>
			<td colspan="7">No deactivated records found!</td>
		</tr>
		@endif
	</tbody>

</table>