<?php
$routeName = Route::currentRouteName();
?>
<div class="main-sidebar">
	<div class="sidebar-head">
		<a href=""><img src="{{ asset('themes/tailwind/images/logo-square.svg') }}"></a>
	</div>
	<ul class="sidebar-list-navigation">
		<li class="<?= ($routeName == 'cms.dashboard' ? 'active' : ''); ?>">
			<a href="{{ route('cms.dashboard') }}"><img src="{{ asset('themes/tailwind/images/home.svg') }}"></a>
		</li>
		@if (auth()->user()->userRole->hasAccess('manage-client-company-settings-all'))
			<li class="<?= ($routeName == 'cms.companies' || $routeName == 'cms.companies.show' ? 'active' : ''); ?>">
				<a href="{{ route('cms.companies') }}"><img src="{{ asset('themes/tailwind/images/company.svg') }}"></a>
			</li>
		@endif
		@if (auth()->user()->userRole->hasAccess('manage-job-queue'))
			@if (auth()->user()->userRole->hasAccess('manage-bookkeeping'))
				<li class="<?= ($routeName == 'cms.bookkeepings' || $routeName == 'cms.bookkeepings.categories' || $routeName == 'cms.bookkeepings.document-libraries' ? 'active' : ''); ?>">
					<a href="{{ route('cms.bookkeepings') }}"><img src="{{ asset('themes/tailwind/images/business-accounting.svg') }}"></a>
				</li>
			@endif
			@if (auth()->user()->userRole->hasAccess('manage-comp-sec'))
				<li class="<?= ($routeName == 'cms.company-secretary' ? 'active' : ''); ?>">
					<a href="{{ route('cms.company-secretary') }}"><img src="{{ asset('themes/tailwind/images/secretary.svg') }}"></a>
				</li>
			@endif
		@endif
		<li class="<?= ($routeName == 'cms.users' ? 'active' : ''); ?>">
			<a href="{{ route('cms.users') }}"><img src="{{ asset('themes/tailwind/images/user.svg') }}"></a>
		</li>
		<li class="<?= ($routeName == 'cms.crm' ? 'active' : ''); ?>">
			<a href="{{ route('cms.crm') }}"><img src="{{ asset('themes/tailwind/images/customer-services.svg') }}"></a>
		</li>
		<li class="<?= ($routeName == 'cms.securities' ? 'active' : ''); ?>">
			<a href="{{ route('cms.securities') }}"><img src="{{ asset('themes/tailwind/images/security.svg') }}"></a>
		</li>
		@if (auth()->user()->userRole->hasAccess('manage-subscription'))
			<li class="<?= ($routeName == 'cms.subscriptions' || $routeName == 'cms.subscriptions.management' ? 'active' : ''); ?>">
				<a href="{{ route('cms.subscriptions') }}"><img src="{{ asset('themes/tailwind/images/receipt.svg') }}"></a>
			</li>
		@endif
		@if (auth()->user()->userRole->hasAccess('manage-service-chat'))
			<li class="<?= ($routeName == 'cms.chat' ? 'active' : ''); ?>">
				<a href="{{ route('cms.chat') }}"><img src="{{ asset('themes/tailwind/images/message.svg') }}"></a>
			</li>
		@endif
		@if (auth()->user()->userRole->hasAccess('manage-enquiry-box'))
			<li class="<?= ($routeName == 'cms.enquiries' ? 'active' : ''); ?>">
				<a href="{{ route('cms.enquiries') }}"><img src="{{ asset('themes/tailwind/images/question.svg') }}"></a>
			</li>
		@endif
		@if (auth()->user()->userRole->hasAccess('manage-terms-and-conditions'))
			<li class="<?= ($routeName == 'cms.terms-and-conditions' ? 'active' : ''); ?>">
				<a href="{{ route('cms.terms-and-conditions') }}"><img src="{{ asset('themes/tailwind/images/subscription.svg') }}"></a>
			</li>
		@endif
		@if (auth()->user()->userRole->hasAccess('manage-privacy-policy'))
			<li class="<?= ($routeName == 'cms.privacy-policy' ? 'active' : ''); ?>">
				<a href="{{ route('cms.privacy-policy') }}"><img src="{{ asset('themes/tailwind/images/warning.svg') }}"></a>
			</li>
		@endif
	</ul>
</div>