"""Result of a license deactivation request."""

from __future__ import annotations

from dataclasses import dataclass
from typing import Any


@dataclass(frozen=True)
class DeactivationResult:
    """Result of a license deactivation request."""

    deactivated: bool

    def is_deactivated(self) -> bool:
        """Whether the deactivation was successful."""
        return self.deactivated

    def to_dict(self) -> dict[str, Any]:
        """Serialize to a plain dictionary."""
        return {"deactivated": self.deactivated}
