<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var \Magento\Wishlist\Block\Customer\Sharing $block */
?>
<form class="form wishlist share"
      action="<?= $block->escapeUrl($block->getSendUrl()) ?>"
      id="form-validate"
      method="post"
      data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>"
      data-mage-init='{"validation":{}}'>
    <fieldset class="fieldset">
        <?= $block->getBlockHtml('formkey') ?>
        <div class="block-title-account"><h3><?= $block->escapeHtml(__('Sharing Information')) ?></h3></div>
        <div class="field emails required">
            <label class="label" for="email_address"><span><?= $block->escapeHtml(__('Email addresses, separated by commas')) ?></span></label>
            <div class="control">
                <textarea name="emails" cols="60" rows="5" id="email_address" data-validate="{required:true,'validate-emails':true}"><?= /* @noEscape */ $block->getEnteredData('emails') ?></textarea>
            </div>
        </div>
        <div class="field text">
            <label class="label" for="message"><span><?= $block->escapeHtml(__('Message')) ?></span></label>
            <div class="control">
                <textarea id="message" name="message" cols="60" rows="5"><?= /* @noEscape */ $block->getEnteredData('message') ?></textarea>
            </div>
        </div>
        <?php if ($this->helper(\Magento\Wishlist\Helper\Rss::class)->isRssAllow()) : ?>
            <div class="field choice rss">
                <input type="checkbox" name="rss_url" id="rss_url" value="1" title="<?= $block->escapeHtmlAttr(__('Check here to link an RSS feed to your Wish List.')) ?>" class="checkbox">
                <label class="label" for="rss_url">
                    <span>
                        <?= $block->escapeHtml(__('Check here to link an RSS feed to your Wish List.')) ?>
                    </span>
                </label>
            </div>
        <?php endif; ?>
    </fieldset>
    <?= $block->getChildHtml('captcha'); ?>
    <div class="actions-toolbar-form">
        <div class="primary">
            <button type="submit" title="<?= $block->escapeHtmlAttr(__('Share Wish List')) ?>" class="action submit btn btn-primary btn-square">
                <span><?= $block->escapeHtml(__('Share Wish List')) ?></span>
            </button>
        </div>
        <div class="secondary">
            <a class="action btn btn-secondary btn-sm back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>"><span><?= $block->escapeHtml(__('Back')) ?></span></a>
        </div>
    </div>
</form>
