<div id="companies-last-updated" class="box overflow-hidden">

	<div class="box-header">
		<div class="sm:flex justify-between space-y-2 sm:space-y-0">
			<h5 class="box-title my-auto">{{ __('forms.Companies') }}</h5>
			<div class="block ltr:ml-auto rtl:mr-auto my-auto">
				<a href="{{ route('crm.companies.create') }}"
					class="ti-btn ti-btn-soft-success py-1 px-3 my-0">{{ __('forms.CreateNew') }}</a>

				<a href="#" class="ti-btn ti-btn-soft-light py-1 px-3 my-0">{{ __('forms.All') }}</a>
			</div>
		</div>
	</div>

	<div class="box-body p-0 activity-table">
		<div class="overflow-auto">
			<table class="ti-custom-table ti-custom-table-head">
				<thead>
					<tr>
						<th scope="col">{{ __('forms.CompanyName') }}</th>
						<th scope="col">{{ __('forms.Email') }}</th>
						<th scope="col">{{ __('forms.Phone') }}</th>
						<th scope="col">{{ __('forms.Mobile') }}</th>
						<th scope="col" class="!text-end">{{ __('forms.Actions') }}</th>
					</tr>
				</thead>
				<tbody>
					@if ($companies)
						@forelse($companies as $company)
							<tr>
								<td>
									<p class="text-sm mb-0 text-gray-800 dark:text-white">{{ $company->short_name }}
										{{ $company->last_name }}</p>
								</td>
								<td>
									<span class="text-xs text-gray-500 dark:text-white/70">{{ $company->email }}</span>
								</td>
								<td>
									<span class="text-xs text-gray-500 dark:text-white/70">{{ $company->phone }}</span>
								</td>
								<td>
									<span class="text-xs text-gray-500 dark:text-white/70">{{ $company->mobile }}</span>
								</td>
								<td class="border-top-dashed pe-4 text-right">
									<!-- View Button -->

									{{-- <a href="#"
										class="rounded-sm bg-success/10 text-success hover:bg-success hover:text-white py-1 px-3 mr-2">
										<i class="ti ti-eye"></i>
									</a> --}}

									<!-- Edit Button -->
									<a href="{{ route('crm.companies.edit', $company) }}"
										class="rounded-sm bg-info/10 text-info hover:bg-info hover:text-white py-1 px-3 mr-2">
										<i class="ti ti-edit"></i>
									</a>

									<!-- Delete Button -->
									{{-- <button type="button" class="rounded-sm bg-danger/10 text-danger hover:bg-danger hover:text-white py-1 px-3">
										<i class="ti ti-trash"></i>
									</button> --}}
								</td>
							</tr>
						@empty
							<tr>
								<td colspan="4" class="text-center text-gray-500">No companies found.</td>
							</tr>
						@endforelse
					@endif
				</tbody>
			</table>

		</div>
	</div>

</div>
