<?php

declare(strict_types=1);

namespace apexl\Io\modules\user\Actions;

use apexl\Io\modules\user\exceptions\SessionException;
use apexl\Io\modules\user\services\SessionMasqueradeService;

final readonly class EndMasqueradeAction
{
    public function __construct(
        private SessionMasqueradeService $masqueradeService
    ) {}

    /**
     * @throws SessionException
     */
    public function handle(): void
    {
        $this->masqueradeService->endMasquerade();
    }
}