<?php

namespace App\Policies;

use Fivable\Buildable\Policies\BuildableActivityPolicy as BaseBuildableActivityPolicy;

class BuildableActivityPolicy extends BaseBuildableActivityPolicy
{

    /**
     * This Policy has been published for you by Buildable to allow you to easily override
     * any policy functions you need to in your application. Because this overrides
     * Buildable's own corresponding Policy, you will be able to update your
     * version of the Buildable package and maintain your custom Policy
     * methods, without risking the loss additions or changes from
     * the base class. Of course, if you've overridden anything
     * you will not effectively get the changes when updating
     */

//    /**
//     * Determine whether the User can view the BuildableActivity
//     * @param  User  $user
//     * @param  BuildableActivity  $buildableActivity
//     * @return bool
//     */
//    public function view(User $user, BuildableActivity $buildableActivity) : bool
//    {
//        $canSeeFeed = !($user->isEditor());
//        $canSeeAudit = $user->isSuperadmin();
//
//        return ($buildableActivity->isFeed() && $canSeeFeed) || ($buildableActivity->isAudit() && $canSeeAudit);
//    }

//    /**
//     * Determine whether the User can view an index of specified types of BuildableActivity
//     * @param User $user
//     * @param array|NULL $types
//     * @return bool
//     */
//    public function viewIndex(User $user, array $types = NULL)
//    {
//        switch ($types) {
//            case 'feed':
//                return !($user->isEditor());
//            case 'audit':
//            case /*all*/NULL:
//                return $user->isSuperadmin();
//        }
//    }

//    /**
//     * Determine whether the User can delete this BuildableActivity.
//     * @param  User  $user
//     * @return bool
//     */
//    public function delete(User $user) : bool
//    {
//        return $user->isSuperadmin();
//    }
}
