<?php

namespace App\Policies;

use App\Models\GarmentType;
use App\Models\User;

class GarmentTypePolicy
{
    public function viewAny(User $user): bool
    {
        return $user->hasRole('Administrador') && $user->can('administracion.areas');
    }

    public function create(User $user): bool
    {
        return $user->hasRole('Administrador') && $user->can('administracion.areas');
    }

    public function update(User $user, GarmentType $garmentType): bool
    {
        return $user->hasRole('Administrador') && $user->can('administracion.areas');
    }

    public function delete(User $user, GarmentType $garmentType): bool
    {
        return $user->hasRole('Administrador') && $user->can('administracion.areas');
    }
}
