<?php

namespace Bixo\Asset\Policies;

use Bixo\Asset\Models\Asset;
use Illuminate\Foundation\Auth\User as Authenticatable;

trait AssetAction
{

    /**
     * Determine if the given user can copy the given asset.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function copy(Authenticatable $user, Asset $asset)
    {

        if ($authUser->canDo('asset.asset.action.copy')) {
            return true;
        }

        $this->model->is_owner;
    }

    /**
     * Determine if the given user can empty the given asset.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    function empty(Authenticatable $user, Asset $asset) {

        if ($authUser->canDo('asset.asset.action.empty')) {
            return true;
        }

        $this->model->is_owner;
    }

    /**
     * Determine if the given user can transfer the given asset.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function transfer(Authenticatable $user, Asset $asset)
    {

        if ($authUser->canDo('asset.asset.action.transfer')) {
            return true;
        }

        $this->model->is_owner;
    }

}