<?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\CoreBundle\Message;

use Ferienpass\CoreBundle\Entity\Attendance;

/**
 * Dispatched when the team creates an attendance that the participant still has to
 * finish themselves — an open compulsory consent or a delegated question. The
 * handler mails the signed confirmation-page link. Mirrors
 * {@see AnonymousAttendanceUnconfirmed}; dispatch it with a {@see
 * \Ferienpass\CoreBundle\Messenger\UuidStamp} carrying the admin action's group
 * uuid so the mail is logged under the same outbox entry.
 */
class AttendanceCompletionRequested implements LoggableMessageInterface
{
    public function __construct(private readonly string $attendance)
    {
    }

    public function getAttendance(): string
    {
        return $this->attendance;
    }

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