"""Tiny stand-in classes shared by ``--from-fixture`` + ``audit_benchmark``."""

from __future__ import annotations


class _RoleStub:
    """Role-like stand-in for the ``RoleLike`` protocol used by build_plan."""

    # ``managed`` is part of the ``RoleLike`` protocol that
    # ``role_filter.persistent_role_ids_for`` and ``managed_by_aa``
    # consult during ``apply_plan``. Without it on the slot list, any
    # attribute access on a stub instance raises ``AttributeError``;
    # adding it to ``__slots__`` and giving the constructor a default
    # of ``False`` (the synthetic decorative roles produced here are
    # never Discord-managed by definition) keeps the apply-side hot
    # path crash-free.
    __slots__ = ("id", "managed", "name")

    def __init__(
        self, role_id: int, name: str, *, managed: bool = False
    ) -> None:
        self.id = role_id
        self.name = name
        self.managed = managed
