<?php
/**
 * Hyvä Themes - https://hyva.io
 * Copyright © Hyvä Themes. All rights reserved.
 * See COPYING.txt for license details.
 */

declare(strict_types=1);

use Magento\Catalog\Block\Product\View;
use Magento\Framework\Escaper;

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

/**
 * This template was never used and is deprecated.
 * It only remains for backward compatibility with customizations that may be using it.
 *
 * The qty inputs are rendered as part of Magento_Checkout/templates/php-cart/item/default.phtml
 *
 * @deprecated
 */


$product = $block->getProduct();
$buttonTitle = __('Update Cart');

?>
<?php if ($product->isSaleable()): ?>
    <div class="box-tocart update">
        <fieldset class="fieldset">
            <?php if ($block->shouldRenderQuantity()): ?>
            <div class="field qty">
                <label class="label" for="qty"><span><?= $escaper->escapeHtml(__('Qty')) ?></span></label>
                <div class="control">
                    <input type="number"
                           name="qty"
                           id="qty"
                           min="0"
                           value=""
                           title="<?= $escaper->escapeHtmlAttr(__('Qty')) ?>"
                           class="form-input qty"
                           data-validate="<?= $escaper->escapeHtml(json_encode($block->getQuantityValidators())) ?>">
                </div>
            </div>
            <?php endif; ?>
            <div class="actions">
                <button type="submit"
                        title="<?= $escaper->escapeHtmlAttr($buttonTitle) ?>"
                        class="action primary tocart"
                        id="product-updatecart-button">
                    <span><?= $escaper->escapeHtml($buttonTitle) ?></span>
                </button>
                <?= $block->getChildHtml('', true) ?>
            </div>
        </fieldset>
    </div>
<?php endif; ?>
