<?php

namespace App\Policies;

use App\Models\LeadSource\LeadSource;
use App\Models\User\User;

class LeadSourcePolicy {
    public function viewAny(User $user) {
        return $user->can('sources.view');
    }

    public function view(User $user, LeadSource $leadSource) {

        return $user->can('sources.view.single');
    }

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

    public function update(User $user, LeadSource $leadSource) {
        return $user->can('sources.edit');
    }

    public function delete(User $user, LeadSource $leadSource) {
        return $user->can('sources.delete');
    }

    public function toggle(User $user, LeadSource $leadSource) {
        return $user->can('sources.toggle');
    }
}
