<?php

namespace Modules\Activity\Policies;

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

class ActivityTypePolicy
{
    use HandlesAuthorization;

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

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

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

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

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

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