<?php

namespace App\Components\Admin\Users;

use App\Models\User\User;
use Livewire\Component;

class UserProfile extends Component {
    public User $user;

    public function render() {
        return view('components.admin.users.user-profile', [
            'roles' => $this->user->roles()->with('permissions')->get(),
            'permissions' => $this->user->getAllPermissions()
                ->groupBy('group'),
        ]);
    }
}
