<?php

namespace App\Policies;

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

class LeadSourceEndpointPolicy {

    public function view(User $user, LeadSourceEndpoint $endpoint) {
        return $user->can('sources.endpoints.view');
    }

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

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

    public function delete(User $user, LeadSourceEndpoint $endpoint) {
        return $user->can('sources.endpoints.delete');
    }

    public function toggle(User $user, LeadSourceEndpoint $endpoint) {
        return $user->can('sources.endpoints.toggle');
    }
}
