<?php

namespace App\Policies\Contact;

use App\Models\Contact\ContactTemplateTrigger;
use App\Models\User\User;

class ContactTemplateTriggerPolicy
{
    public function manage(User $user): bool
    {
        return $user->can('communications.triggers.manage');
    }

    public function viewAny(User $user): bool
    {
        return $this->manage($user);
    }

    public function create(User $user): bool
    {
        return $this->manage($user);
    }

    public function update(User $user, ContactTemplateTrigger $trigger): bool
    {
        return $this->manage($user);
    }

    public function delete(User $user, ContactTemplateTrigger $trigger): bool
    {
        return $this->manage($user);
    }
}
