<?php

namespace App\Policies;

use App\Models\Admin;
use App\Models\DomainCost;
use Illuminate\Auth\Access\HandlesAuthorization;

class DomainCostPolicy
{
    use HandlesAuthorization;

    /**
     * Determine whether the admin can view any domain costs.
     */
    public function viewAny(Admin $admin): bool
    {
        return $admin->hasPermissionTo('view domain costs');
    }

    /**
     * Determine whether the admin can view the domain cost.
     */
    public function view(Admin $admin, DomainCost $domainCost): bool
    {
        return $admin->hasPermissionTo('view domain costs');
    }

    /**
     * Determine whether the admin can create domain costs.
     */
    public function create(Admin $admin): bool
    {
        return $admin->hasPermissionTo('create domain costs');
    }

    /**
     * Determine whether the admin can update the domain cost.
     */
    public function update(Admin $admin, DomainCost $domainCost): bool
    {
        return $admin->hasPermissionTo('update domain costs');
    }

    /**
     * Determine whether the admin can update any domain cost.
     */
    public function updateAny(Admin $admin): bool
    {
        return $admin->hasPermissionTo('update domain costs');
    }

    /**
     * Determine whether the admin can delete the domain cost.
     */
    public function delete(Admin $admin, DomainCost $domainCost): bool
    {
        return $admin->hasPermissionTo('delete domain costs');
    }

    /**
     * Determine whether the admin can delete any domain cost.
     */
    public function deleteAny(Admin $admin): bool
    {
        return $admin->hasPermissionTo('delete domain costs');
    }

    /**
     * Determine whether the admin can restore the domain cost.
     */
    public function restore(Admin $admin, DomainCost $domainCost): bool
    {
        return $admin->hasPermissionTo('restore domain costs');
    }

    /**
     * Determine whether the admin can permanently delete the domain cost.
     */
    public function forceDelete(Admin $admin, DomainCost $domainCost): bool
    {
        return $admin->hasPermissionTo('force delete domain costs');
    }
}
