@if (hasPermission('setting_menu'))
    <li class="sidebar-menu-item">
        <a href="javascript:void(0)"
            class="parent-item-content has-arrow {{ menu_active_by_route(['manage.settings.view', 'appScreenSetup', 'manage.settings.currency_list', 'language.index', 'language.setup', 'content.list', 'company.settings.activation', 'company.settings.configuration', 'company.settings.brandings', 'branches.index', 'users_device.index', 'company.settings.addon.activation']) }}">
            <i class="las la-cog"></i>
            <span class="on-half-expanded">
                {{ _trans('common.Settings') }}
            </span>
        </a>
        <ul
            class="child-menu-list  {{ set_active(['admin/settings*', 'admin/settings/list', 'admin/settings/leave*', 'admin/settings/ip-configuration*', 'company/settings', 'admin/settings/app-setting/dashboard', 'admin/settings/language-setup', 'admin/content/list*', 'admin/saas/email-template*', 'admin/company-setup*', 'branches', 'users-device']) }}">

            @if (hasPermission('general_settings_read'))
                <li class="nav-item {{ menu_active_by_route('manage.settings.view') }}">
                    <a href="{{ route('manage.settings.view') }}" class=" {{ set_active('admin/settings/list') }}">
                        <span>{{ _trans('common.General Settings') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('app_screen_setting'))
                <li class="nav-item {{ menu_active_by_route('appScreenSetup') }}">
                    <a href="{{ route('appScreenSetup') }}" class=" {{ set_active('admin/settings/contact/*') }}">
                        <span>{{ _trans('common.App Setting') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('currency_read'))
                <li class="nav-item {{ menu_active_by_route('manage.settings.currency_list') }}">
                    <a href="{{ route('manage.settings.currency_list') }}" class="  ">
                        <span>{{ _trans('common.Currency') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('content_read'))
                <li class="nav-item {{ menu_active_by_route(['content.list']) }}">
                    <a href="{{ route('content.list') }}" class="nav-link {{ set_active('admin/content/list*') }}">
                        <span>{{ _trans('common.Contents') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('language_read'))
                <li class="nav-item {{ menu_active_by_route(['language.index', 'language.setup']) }}">
                    <a href="{{ route('language.index') }}" class=" {{ set_active('admin/settings/language/*') }}">
                        <span>{{ _trans('settings.Language') }}</span>
                    </a>
                </li>
            @endif

            @if (!isMainCompany() && isModuleActive('MultiBranch') && hasPermission('branch_read'))
                <li
                    class="sidebar-menu-item {{ menu_active_by_route(['branches.index', 'branches.edit', 'branches.create']) }}">
                    <a href="{{ route('branches.index') }}" class=" {{ set_active('dashboard/branches') }}">
                        <span>{{ _trans('common.Branches') }}</span>

                        @if (config('app.style') == 'demo')
                            <span class="badge text-bg-warning">{{ _trans('common.Pro') }}</span>
                        @endif
                    </a>
                </li>
            @endif

            @if (hasPermission('email_setup_read') && isMainCompany())
                <li class="nav-item {{ menu_active_by_route('saas.email-template.index') }}">
                    <a href="{{ route('saas.email-template.index') }}"
                        class=" {{ set_active('admin/saas/email-template*') }}">
                        <span>{{ _trans('common.Email Template') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('configuration_read'))
                <li class="nav-item {{ menu_active_by_route(['company.settings.configuration']) }}">
                    <a href="{{ route('company.settings.configuration') }}" class=" ">
                        <span>{{ _trans('common.Configurations') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('activation_read'))
                <li class="nav-item {{ menu_active_by_route('company.settings.activation') }}">
                    <a href="{{ route('company.settings.activation') }}" class="">
                        <span>{{ _trans('common.Activation') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('activation_read'))
                <li class="nav-item {{ menu_active_by_route('company.settings.addon.activation') }}">
                    <a href="{{ route('company.settings.addon.activation') }}" class="">
                        <span>{{ _trans('common.Addons') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('branding_read'))
                <li class="nav-item {{ menu_active_by_route('company.settings.brandings') }}">
                    <a href="{{ route('company.settings.brandings') }}" class="">
                        <span>{{ _trans('common.Branding') }}</span>
                    </a>
                </li>
            @endif

            @if (isModuleActive('SingleDeviceLogin') && hasPermission('user_device_read'))
                <li class="nav-item {{ menu_active_by_route('users_device.index') }}">
                    <a href="{{ route('users_device.index') }}">
                        <span class="on-half-expanded">
                            {{ _trans('common.Device Management') }}
                        </span>
                    </a>
                </li>
            @endif
        </ul>
    </li>
@endif
