<?php

use Fisharebest\Webtrees\Contracts\UserInterface;
use Fisharebest\Webtrees\I18N;

/**
 * @var string        $message
 * @var UserInterface $recipient
 * @var UserInterface $sender
 * @var string        $url
 */

?>
<div dir="<?= I18N::locale()->direction() ?>" lang="<?= I18N::locale()->languageTag() ?>">
    <p>
        <?= I18N::translate('Hello %s…', '<bdi>' . e($recipient->realName()) . '</bdi>') ?>
    </p>

    <p>
        <?= /* I18N: %s is a person's name */
        I18N::translate('%s sent you the following message.', e($sender->realName())) ?>
    </p>

    <hr>

    <p>
        <?= nl2br(e($message), false) ?>
    </p>

    <hr>

    <?php if ($url !== '') : ?>
        <p>
            <?= I18N::translate('This message was sent while viewing the following URL: ') ?>
            <?= e($url) ?>
        </p>
    <?php endif ?>
</div>
