<?php

namespace Modules\Activity\Policies;

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

class ActivityPolicy
{
    use HandlesAuthorization;

    public function viewAny($user): bool
    {
        return $user->hasPermissionTo('lihat aktiviti');
    }

    public function view($user, ?Activity $activity = null): bool
    {
        return $user->hasPermissionTo('lihat aktiviti');
    }

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

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

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

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