<?php

namespace App\Modules\Settings\Localization\Policies;

use App\Models\User;
use App\Modules\Settings\Localization\Models\Translation;

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

    public function view(User $user, Translation $translation): bool
    {
        return $user->can('translations.view');
    }

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

    public function update(User $user, Translation $translation): bool
    {
        return $user->can('translations.update', $translation);
    }

    public function delete(User $user, Translation $translation): bool
    {
        return $user->can('translations.delete', $translation);
    }
}
