<?php

namespace Modules\Activity\Policies;

use Illuminate\Auth\Access\HandlesAuthorization;
use Modules\Activity\Entities\ActivityReport;

class ActivityReportPolicy
{
    use HandlesAuthorization;

    public function viewAny($user): bool
    {
        return true;
    }

    public function view($user, ?ActivityReport $activityReport = null): bool
    {
        return true;
    }

    public function create($user): bool
    {
        return $user->hasPermissionTo('tambah laporan aktiviti');
    }

    public function update($user, ?ActivityReport $activityReport = null): bool
    {
        return $user->hasPermissionTo('kemaskini laporan aktiviti');
    }

    public function deleteAny($user): bool
    {
        return $user->hasPermissionTo('hapus laporan aktiviti');
    }

    public function delete($user, ?ActivityReport $activityReport = null): bool
    {
        return $user->hasPermissionTo('hapus laporan aktiviti');
    }
}
