<?php

namespace Bixo\Payment\Policies;

use Illuminate\Foundation\Auth\User as Authenticatable;

trait DetailExim
{

    /**
     * Determine if the given user can approve the given detail.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function import(Authenticatable $user)
    {
        if ($user->canDo('payment.detail.import')) {
            return true;
        }

        return false;
    }

    /**
     * Determine if the given user can approve the given detail.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function export(Authenticatable $user)
    {
        if ($user->canDo('payment.detail.export')) {
            return true;
        }

        return false;
    }
}