<?php

namespace App\Modules\Inventory\Policies;

use App\Models\User;
use App\Modules\Inventory\Models\Warehouse;

class WarehousePolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('inventory.warehouses.view');
    }

    public function view(User $user, Warehouse $warehouse): bool
    {
        return $user->can('inventory.warehouses.view', $warehouse);
    }

    public function create(User $user): bool
    {
        return $user->can('inventory.warehouses.manage');
    }

    public function deactivate(User $user, Warehouse $warehouse): bool
    {
        return $user->can('inventory.warehouses.manage', $warehouse);
    }
}
