<?php


namespace Bixo\Shop\Policies;

use Litepie\User\Interfaces\UserPolicyInterface;

trait SparePartReport
{

    /**
     * Determine if the given user can approve the given spare_part.
     *
     * @param UserPolicyInterface $authUser
     *
     * @return bool
     */
    public function povote(UserPolicyInterface $authUser)
    {
        if ($authUser->canDo('shop.spare_part.report.povote')) {
            return true;
        }

        return false;
    }

    /**
     * Determine if the given user can approve the given spare_part.
     *
     * @param UserPolicyInterface $authUser
     *
     * @return bool
     */
    public function report(UserPolicyInterface $authUser)
    {
        if ($authUser->canDo('shop.spare_part.report')) {
            return true;
        }

        return false;
    }

    /**
     * Determine if the given user can approve the given spare_part.
     *
     * @param UserPolicyInterface $authUser
     *
     * @return bool
     */
    public function download(UserPolicyInterface $authUser)
    {
        if ($authUser->canDo('shop.spare_part.report.download')) {
            return true;
        }

        return false;
    }
}