
    Ri                        d Z ddlmZ ddlmZmZ ddlmZmZ ddl	m
Z
 erddlmZ ddlmZ ddlmZ  G d	 d
e      Z G d de      Zy)zDomain indices.    )annotations)ABCabstractmethod)TYPE_CHECKING
NamedTuple)SphinxError)Iterable)ClassVar)Domainc                  X    e Zd ZU dZded<   ded<   ded<   ded<   ded<   ded	<   ded
<   y)
IndexEntryzAn index entry.

    .. note::

       The *qualifier* and *description* are not rendered for some output formats,
       such as LaTeX.
    strnameintsubtypedocnameanchorextra	qualifierdescrN)__name__
__module____qualname____doc____annotations__     M/home/agent/.friday_env/lib/python3.12/site-packages/sphinx/domains/_index.pyr   r      s8     I L L K J N Jr   r   c                  X    e Zd ZU dZded<   ded<   dZded<   d
dZe	 d	 	 	 dd	       Zy)Indexa  An Index is the description for a domain-specific index.  To add an index to
    a domain, subclass Index, overriding the three name attributes:

    * `name` is an identifier used for generating file names.
      It is also used for a hyperlink target for the index. Therefore, users can
      refer the index page using ``ref`` role and a string which is combined
      domain name and ``name`` attribute (ex. ``:ref:`py-modindex```).
    * `localname` is the section title for the index.
    * `shortname` is a short name for the index, for use in the relation bar in
      HTML output.  Can be empty to disable entries in the relation bar.

    and providing a :meth:`generate` method.  Then, add the index class to
    your domain's `indices` list.  Extensions can add indices to existing
    domains using :meth:`~sphinx.application.Sphinx.add_index_to_domain`.

    .. versionchanged:: 3.0

       Index pages can be referred by domain name and index name via
       :rst:role:`ref` role.
    zClassVar[str]r   	localnameNzClassVar[str | None]	shortnamec                    | j                   r| j                  %d| j                  j                   d}t	        |      || _        y )NzIndex subclass z has no valid name or localname)r   r!   	__class__r   r   domain)selfr%   msgs      r   __init__zIndex.__init__Q   s>    yyDNN2#DNN$;$;#<<[\Cc""r   c                    t         )a  Get entries for the index.

        If ``docnames`` is given, restrict to entries referring to these
        docnames.

        The return value is a tuple of ``(content, collapse)``:

        ``collapse``
          A boolean that determines if sub-entries should start collapsed (for
          output formats that support collapsing sub-entries).

        ``content``:
          A sequence of ``(letter, entries)`` tuples, where ``letter`` is the
          "heading" for the given ``entries``, usually the starting letter, and
          ``entries`` is a sequence of single entries.
          Each entry is an :py:class:`IndexEntry`.
        )NotImplementedError)r&   docnamess     r   generatezIndex.generateW   s
    * "!r   )r%   r   returnNone)N)r+   zIterable[str] | Noner-   z/tuple[list[tuple[str, list[IndexEntry]]], bool])	r   r   r   r   r   r"   r(   r   r,   r   r   r   r    r    7   sL    * &*I#* /3","	8" "r   r    N)r   
__future__r   abcr   r   typingr   r   sphinx.errorsr   collections.abcr	   r
   sphinx.domainsr   r   r    r   r   r   <module>r5      s9     " # , %(%# #L5"C 5"r   