<?php

declare(strict_types=1);

/*
 * This file is part of the Ferienpass package.
 *
 * (c) Richard Henkenjohann <richard@ferienpass.online>
 *
 * For more information visit the project website <https://ferienpass.online>
 * or the documentation under <https://docs.ferienpass.online>.
 */

namespace Ferienpass\CmsBundle\Message;

use Ferienpass\CoreBundle\Entity\User;
use Ferienpass\CoreBundle\Message\LoggableMessageInterface;

/**
 * A password reset was requested for a passkey-only (passwordless) account.
 *
 * No reset token is issued for such accounts — adding a password by e-mail
 * would undo the phishing-resistance of passkeys. The requester is instead
 * informed (by mail) to sign in with their passkey.
 */
class PasswordResetUnavailable implements LoggableMessageInterface
{
    public function __construct(private readonly string $userUuid)
    {
    }

    public function getUserUuid(): string
    {
        return $this->userUuid;
    }

    public function getRelated(): array
    {
        return [
            User::class => $this->userUuid,
        ];
    }
}
