<?php
/**
 * Hyvä Themes - https://hyva.io
 * Copyright © Hyvä Themes 2020-present. All rights reserved.
 * This product is licensed per Magento install
 * See https://hyva.io/license
 */

declare(strict_types=1);

use Hyva\Theme\Block\SortableItem;
use Magento\Framework\Escaper;
use Magento\Customer\Model\Account\Redirect;

/** @var SortableItem $block */
/** @var Escaper $escaper */

$label = $block->getLabel() ? $block->getLabel() : __('Sign In');
?>

<a id="<?= $escaper->escapeHtmlAttr($block->getNameInLayout()) ?>"
   class="block px-4 py-2 lg:px-5 lg:py-2 text-black font-sen"
   onclick="hyva.setCookie && hyva.setCookie(
       '<?= $escaper->escapeJs(Redirect::LOGIN_REDIRECT_URL) ?>',
       window.location.href,
       1
   )"
   href="<?= $escaper->escapeUrl($block->getUrl('customer/account/index')) ?>"
   title="<?= $escaper->escapeHtmlAttr($label) ?>"
>
    <?= $escaper->escapeHtml($label) ?>
</a>
