<?php

namespace Bixo\Feed\Policies;

use Bixo\Feed\Models\Interaction;
use Illuminate\Foundation\Auth\User as Authenticatable;

trait InteractionAction
{

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

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

        $this->model->is_owner;
    }

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

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

        $this->model->is_owner;
    }

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

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

        $this->model->is_owner;
    }

}