<?php

namespace App\Policies;

use App\Models\EmailMessage;
use App\Models\User;

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

    public function view(User $user, EmailMessage $message): bool
    {
        return $user->can('email.view');
    }

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

    public function delete(User $user, EmailMessage $message): bool
    {
        return $user->can('email.delete');
    }
}
