<?php

namespace App\Policies;

use App\Models\Claim\Claim;
use App\Models\User\User;

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

    public function view(User $user, Claim $claim): bool {
        return $user->can('claims.view');
    }

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

    public function edit(User $user, Claim $claim): bool {
        return $user->can('claims.edit');
    }

    public function delete(User $user, Claim $claim): bool {
        return $user->can('claims.delete');
    }

    public function generateApplication(User $user, Claim $claim) {
        return $user->can('claims.application.generate');
    }

    public function sendCFARequest(User $user, Claim $claim) {
        return $user->can('claims.request.send');
    }

    public function editStatus(User $user, Claim $claim): bool {
        return $user->can('claims.status.edit');
    }

    public function editKeyDates(User $user, Claim $claim): bool {
        return $user->can('claims.key-dates.edit');
    }
}
