<div class="pt-3">
    <div class="h5 pb-3">{{ $title }}</div>
    @error($requestName)
        <span class="invalid-feedback d-block pb-3">{{ $message }}</span>
    @enderror
    @foreach($permissions as $mainPermission)
        <div class="row ps-3">
            <div class="mb-3">
                <span class="h6 fw-bold">{{ $mainPermission->getTitle() }}</span>
            </div>
            <ul>
                @foreach($mainPermission->getPermissions() as $keyPermission => $permission)
                    <li class="form-check">
                        <input class="form-check-input" type="checkbox" value="{{ $mainPermission->formatValue($keyPermission) }}" name="{{ $name }}" @checked($role->is_admin || $value->search($mainPermission->formatValue($keyPermission)) !== false) @disabled($role->is_admin) id="form-permission-{{ $requestName }}-{{ $mainPermission->name }}-{{ $keyPermission }}">
                        <label class="form-check-label" for="form-permission-{{ $requestName }}-{{ $mainPermission->name }}-{{ $keyPermission }}">
                            {{ $permission }}
                        </label>
                    </li>
                @endforeach
            </ul>
            <hr>
        </div>
    @endforeach
</div>
