<!-- نظام الزكاة والضرائب -->
<div x-data="{ open: {{ request()->routeIs('zakat-taxes.*') ? 'true' : 'false' }} }" class="mb-1">
    <button @click="open = !open" class="group flex items-center p-3 py-2 text-base font-medium rounded-md
        {{ request()->routeIs('zakat-taxes.*') ? 'bg-red-100 text-red-800' : 'text-gray-700 hover:bg-red-50 hover:text-red-800' }}">
        <svg xmlns="http://www.w3.org/2000/svg" class="ml-3 flex-shrink-0 h-6 w-6
            {{ request()->routeIs('zakat-taxes.*') ? 'text-red-700' : 'text-gray-500 group-hover:text-red-700' }}"
            fill="none" viewBox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
        </svg>
        <span>{{ \App\Helpers\TranslationHelper::transFromDatabase('Zakat and Taxes System', __('Zakat and Taxes System')) }}</span>
        <svg :class="{'rotate-180': open, 'rotate-0': !open}" class="mr-auto h-5 w-5 transform transition-transform duration-200"
            xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
            <path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
        </svg>
    </button>

    <div x-show="open" x-transition class="pr-4 mr-4 border-r border-gray-200">
        <!-- عرض الزكاة والضرائب -->
        @permission('taxes.view')
        <a href="{{ route('zakat-taxes.index') }}" class="group flex items-center p-3 py-2 text-sm font-medium rounded-md
            {{ request()->routeIs('zakat-taxes.index') ? 'text-red-800 bg-red-100' : 'text-gray-700 hover:text-red-800 hover:bg-red-50' }}">
            <span class="ml-2 w-1 h-1 rounded-full {{ request()->routeIs('zakat-taxes.index') ? 'bg-red-600' : 'bg-gray-500' }}"></span>
            <span>{{ \App\Helpers\TranslationHelper::transFromDatabase('View Zakat & Taxes', __('View Zakat & Taxes')) }}</span>
        </a>
        @endpermission

        <!-- إدارة الزكاة والضرائب -->
        @permission('taxes.manage')
        <a href="{{ route('zakat-taxes.manage') }}" class="group flex items-center p-3 py-2 text-sm font-medium rounded-md
            {{ request()->routeIs('zakat-taxes.manage') ? 'text-red-800 bg-red-100' : 'text-gray-700 hover:text-red-800 hover:bg-red-50' }}">
            <span class="ml-2 w-1 h-1 rounded-full {{ request()->routeIs('zakat-taxes.manage') ? 'bg-red-600' : 'bg-gray-500' }}"></span>
            <span>{{ \App\Helpers\TranslationHelper::transFromDatabase('Manage Zakat & Taxes', __('Manage Zakat & Taxes')) }}</span>
        </a>
        @endpermission

        <!-- حسابات الزكاة -->
        @permission('taxes.manage')
        <a href="{{ route('zakat-taxes.calculations') }}" class="group flex items-center p-3 py-2 text-sm font-medium rounded-md
            {{ request()->routeIs('zakat-taxes.calculations') ? 'text-red-800 bg-red-100' : 'text-gray-700 hover:text-red-800 hover:bg-red-50' }}">
            <span class="ml-2 w-1 h-1 rounded-full {{ request()->routeIs('zakat-taxes.calculations') ? 'bg-red-600' : 'bg-gray-500' }}"></span>
            <span>{{ \App\Helpers\TranslationHelper::transFromDatabase('Zakat Calculations', __('Zakat Calculations')) }}</span>
        </a>
        @endpermission

        <!-- الإقرارات الضريبية -->
        @permission('taxes.manage')
        <a href="{{ route('zakat-taxes.declarations') }}" class="group flex items-center p-3 py-2 text-sm font-medium rounded-md
            {{ request()->routeIs('zakat-taxes.declarations') ? 'text-red-800 bg-red-100' : 'text-gray-700 hover:text-red-800 hover:bg-red-50' }}">
            <span class="ml-2 w-1 h-1 rounded-full {{ request()->routeIs('zakat-taxes.declarations') ? 'bg-red-600' : 'bg-gray-500' }}"></span>
            <span>{{ \App\Helpers\TranslationHelper::transFromDatabase('Tax Declarations', __('الإقرارات الضريبية')) }}</span>
        </a>
        @endpermission

        <!-- تقرير الضرائب -->
        @permission('taxes.view')
        <a href="{{ route('zakat-taxes.reports.taxes') }}" class="group flex items-center p-3 py-2 text-sm font-medium rounded-md
            {{ request()->routeIs('zakat-taxes.reports.taxes') ? 'text-red-800 bg-red-100' : 'text-gray-700 hover:text-red-800 hover:bg-red-50' }}">
            <span class="ml-2 w-1 h-1 rounded-full {{ request()->routeIs('zakat-taxes.reports.taxes') ? 'bg-red-600' : 'bg-gray-500' }}"></span>
            <span>{{ \App\Helpers\TranslationHelper::transFromDatabase('Tax Report', __('تقرير الضريبة')) }}</span>
        </a>
        @endpermission

        <!-- الإعدادات -->
        @permission('taxes.manage')
        <a href="{{ route('zakat-taxes.settings') }}" class="group flex items-center p-3 py-2 text-sm font-medium rounded-md
            {{ request()->routeIs('zakat-taxes.settings') ? 'text-red-800 bg-red-100' : 'text-gray-700 hover:text-red-800 hover:bg-red-50' }}">
            <span class="ml-2 w-1 h-1 rounded-full {{ request()->routeIs('zakat-taxes.settings') ? 'bg-red-600' : 'bg-gray-500' }}"></span>
            <span>{{ \App\Helpers\TranslationHelper::transFromDatabase('Settings', __('الإعدادات')) }}</span>
        </a>
        @endpermission
    </div>
</div>
