<?php
/**
 * Webkul Software
 *
 * @category  Webkul
 * @package   Webkul_MpPaypal
 * @author    Webkul
 * @copyright Copyright (c) Webkul Software Private Limited (https://webkul.com)
 * @license   https://store.webkul.com/license.html
 */
$helper = $block->getMpHelper();
$isPartner= $helper->isSeller();
$isSellerGroup = $helper->isSellerGroupModuleInstalled();
$isEnable = $block->isModuleEnable();
$magentoCurrentUrl = $block->getCurrentUrl();
if ($isPartner && $isEnable) {
    if (($isSellerGroup && $helper->isAllowedAction('mppaypal/seller/index')) || !$isSellerGroup) {
        ?>
        <li class="nav item 
        <?= /* @noEscape */ strpos($magentoCurrentUrl, 'mppaypal/seller/index') !== false ? "current":"";?>">
        <?php
        if (strpos($magentoCurrentUrl, 'mppaypal/seller/index') !== false) {
            ?>
            <strong>
            <?= /* @noEscape */ __('Paypal Onboard') ?>
            </strong>
            <?php
        } else {
            ?>
            <a href="<?= $block->escapeUrl($block->getUrl(
                'mppaypal/seller/index',
                ['_secure' => $block->getRequest()->isSecure()]
            )); ?>">
                <?=  /* @noEscape */ __('Paypal Onboard') ?>
            </a>
            <?php
        }
        ?>
        </li>

        <?php
    }
}
