# -*- coding: utf-8 -*-
# autogenerated by kiara

from typing import *  # noqa: F403
from streamlit.delta_generator import DeltaGenerator
from kiara_plugin.streamlit.streamlit import KiaraStreamlit

# imports
if TYPE_CHECKING:
{% for module, classes in imports.items() -%}{%  if not classes %}  import {{ module }}{%  else %}
  from {{ module }} import {{ classes|join(', ') }}
{%  endif %}
{% endfor %}

# Protocol class with all available component attributes
class KiaraStreamlitComponents(Protocol):

  @property
  def api(self) -> "kiara.api.KiaraAPI":
     """Returns the Kiara API instance used by the API."""

{% for signature_string, doc in methods.items() %}
  {{ signature_string }}:
{% if not doc.doc %}    """{{ doc.description }}"""{% else %}    """{{ doc.description }}

    {{ doc.doc }}
    """{% endif %}

{% endfor %}

class KiaraStreamlitAugmented(KiaraStreamlit, KiaraStreamlitComponents):
  """A dummy class to help IDEs with type hinting."""

class KiaraStreamlitAPIProtocol(Protocol):
  """A protocol class that contains all the dynamically discovered kiara-streamlit components."""

  @property
  def kiara(self) -> "KiaraStreamlitAugmented":
    """Returns the Kiara context used by the API."""

class KiaraStreamlitAPI(DeltaGenerator, KiaraStreamlitAPIProtocol):
  """A dummy class to help IDEs with type hinting."""
