"""
This type stub file was generated by pyright.
"""

from typing import Final, TYPE_CHECKING
from streamlit.proto.BokehChart_pb2 import BokehChart as BokehChartProto
from streamlit.runtime.metrics_util import gather_metrics
from bokeh.plotting.figure import Figure
from streamlit.delta_generator import DeltaGenerator

"""A Python wrapper around Bokeh."""
if TYPE_CHECKING:
    ...
ST_BOKEH_VERSION: Final = ...
class BokehMixin:
    @gather_metrics("bokeh_chart")
    def bokeh_chart(self, figure: Figure, use_container_width: bool = ...) -> DeltaGenerator:
        """Display an interactive Bokeh chart.

        Bokeh is a charting library for Python. The arguments to this function
        closely follow the ones for Bokeh's ``show`` function. You can find
        more about Bokeh at https://bokeh.pydata.org.

        To show Bokeh charts in Streamlit, call ``st.bokeh_chart``
        wherever you would call Bokeh's ``show``.

        .. Important::
            You must install ``bokeh==2.4.3`` and ``numpy<2`` to use this
            command.

            If you need a newer version of Bokeh, use our |streamlit-bokeh|_
            custom component instead.

        .. |streamlit-bokeh| replace:: ``streamlit-bokeh``
        .. _streamlit-bokeh: https://github.com/streamlit/streamlit-bokeh

        Parameters
        ----------
        figure : bokeh.plotting.figure.Figure
            A Bokeh figure to plot.

        use_container_width : bool
            Whether to override the figure's native width with the width of
            the parent container. If ``use_container_width`` is ``True`` (default),
            Streamlit sets the width of the figure to match the width of the parent
            container. If ``use_container_width`` is ``False``, Streamlit sets the
            width of the chart to fit its contents according to the plotting library,
            up to the width of the parent container.

        Example
        -------
        >>> import streamlit as st
        >>> from bokeh.plotting import figure
        >>>
        >>> x = [1, 2, 3, 4, 5]
        >>> y = [6, 7, 2, 4, 5]
        >>>
        >>> p = figure(title="simple line example", x_axis_label="x", y_axis_label="y")
        >>> p.line(x, y, legend_label="Trend", line_width=2)
        >>>
        >>> st.bokeh_chart(p)

        .. output::
           https://doc-bokeh-chart.streamlit.app/
           height: 700px

        """
        ...
    
    @property
    def dg(self) -> DeltaGenerator:
        """Get our DeltaGenerator."""
        ...
    


def marshall(proto: BokehChartProto, figure: Figure, use_container_width: bool, element_id: str) -> None:
    """Construct a Bokeh chart object.

    See DeltaGenerator.bokeh_chart for docs.
    """
    ...

