<?php

namespace App\Policies;

use App\Models\Category;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Support\Facades\Auth;

class CategoryPolicy
{
    use HandlesAuthorization;

    public function viewAny(User $user): bool
    {
        return true;
    }

    public function view(User $user, Category $category): bool
    {
        return true;
    }

    public function create(User $user): bool
    {
        return Auth::check();
    }

    public function update(User $user, Category $category): bool
    {
        return Auth::check();
    }

    public function delete(User $user, Category $category): bool
    {
        return Auth::check();
    }

    public function restore(User $user, Category $category): bool
    {
        return Auth::check();
    }

    public function forceDelete(User $user, Category $category): bool
    {
        return Auth::check();
    }
}
