<?php

namespace Bixo\Payment\Policies;

use Illuminate\Foundation\Auth\User as Authenticatable;

trait GatewayExim
{

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

        return false;
    }

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

        return false;
    }
}