<?php

namespace App\Policies;

use App\Models\Contact\ContactTemplate;
use App\Models\User\User;

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

    public function view(User $user, ContactTemplate $template): bool
    {
        return $user->can('templates.view');
    }

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

    public function edit(User $user, ContactTemplate $template): bool
    {
        return $user->can('templates.edit');
    }

    public function update(User $user, ContactTemplate $template): bool
    {
        return $user->can('templates.edit');
    }

    public function delete(User $user, ContactTemplate $template): bool
    {
        return $user->can('templates.delete');
    }
}
