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

import numpy as np
from pandas.util._decorators import Appender

"""Indexer objects for computing start/end window bounds for rolling operations"""
get_window_bounds_doc = ...
class BaseIndexer:
    """Base class for window bounds calculations."""
    def __init__(self, index_array: np.ndarray | None = ..., window_size: int = ..., **kwargs) -> None:
        """
        Parameters
        ----------
        **kwargs :
            keyword arguments that will be available when get_window_bounds is called
        """
        ...
    
    @Appender(get_window_bounds_doc)
    def get_window_bounds(self, num_values: int = ..., min_periods: int | None = ..., center: bool | None = ..., closed: str | None = ..., step: int | None = ...) -> tuple[np.ndarray, np.ndarray]:
        ...
    


class FixedWindowIndexer(BaseIndexer):
    """Creates window boundaries that are of fixed length."""
    @Appender(get_window_bounds_doc)
    def get_window_bounds(self, num_values: int = ..., min_periods: int | None = ..., center: bool | None = ..., closed: str | None = ..., step: int | None = ...) -> tuple[np.ndarray, np.ndarray]:
        ...
    


class VariableWindowIndexer(BaseIndexer):
    """Creates window boundaries that are of variable length, namely for time series."""
    @Appender(get_window_bounds_doc)
    def get_window_bounds(self, num_values: int = ..., min_periods: int | None = ..., center: bool | None = ..., closed: str | None = ..., step: int | None = ...) -> tuple[np.ndarray, np.ndarray]:
        ...
    


class VariableOffsetWindowIndexer(BaseIndexer):
    """Calculate window boundaries based on a non-fixed offset such as a BusinessDay."""
    def __init__(self, index_array: np.ndarray | None = ..., window_size: int = ..., index=..., offset=..., **kwargs) -> None:
        ...
    
    @Appender(get_window_bounds_doc)
    def get_window_bounds(self, num_values: int = ..., min_periods: int | None = ..., center: bool | None = ..., closed: str | None = ..., step: int | None = ...) -> tuple[np.ndarray, np.ndarray]:
        ...
    


class ExpandingIndexer(BaseIndexer):
    """Calculate expanding window bounds, mimicking df.expanding()"""
    @Appender(get_window_bounds_doc)
    def get_window_bounds(self, num_values: int = ..., min_periods: int | None = ..., center: bool | None = ..., closed: str | None = ..., step: int | None = ...) -> tuple[np.ndarray, np.ndarray]:
        ...
    


class FixedForwardWindowIndexer(BaseIndexer):
    """
    Creates window boundaries for fixed-length windows that include the current row.

    Examples
    --------
    >>> df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]})
    >>> df
         B
    0  0.0
    1  1.0
    2  2.0
    3  NaN
    4  4.0

    >>> indexer = pd.api.indexers.FixedForwardWindowIndexer(window_size=2)
    >>> df.rolling(window=indexer, min_periods=1).sum()
         B
    0  1.0
    1  3.0
    2  2.0
    3  4.0
    4  4.0
    """
    @Appender(get_window_bounds_doc)
    def get_window_bounds(self, num_values: int = ..., min_periods: int | None = ..., center: bool | None = ..., closed: str | None = ..., step: int | None = ...) -> tuple[np.ndarray, np.ndarray]:
        ...
    


class GroupbyIndexer(BaseIndexer):
    """Calculate bounds to compute groupby rolling, mimicking df.groupby().rolling()"""
    def __init__(self, index_array: np.ndarray | None = ..., window_size: int | BaseIndexer = ..., groupby_indices: dict | None = ..., window_indexer: type[BaseIndexer] = ..., indexer_kwargs: dict | None = ..., **kwargs) -> None:
        """
        Parameters
        ----------
        index_array : np.ndarray or None
            np.ndarray of the index of the original object that we are performing
            a chained groupby operation over. This index has been pre-sorted relative to
            the groups
        window_size : int or BaseIndexer
            window size during the windowing operation
        groupby_indices : dict or None
            dict of {group label: [positional index of rows belonging to the group]}
        window_indexer : BaseIndexer
            BaseIndexer class determining the start and end bounds of each group
        indexer_kwargs : dict or None
            Custom kwargs to be passed to window_indexer
        **kwargs :
            keyword arguments that will be available when get_window_bounds is called
        """
        ...
    
    @Appender(get_window_bounds_doc)
    def get_window_bounds(self, num_values: int = ..., min_periods: int | None = ..., center: bool | None = ..., closed: str | None = ..., step: int | None = ...) -> tuple[np.ndarray, np.ndarray]:
        ...
    


class ExponentialMovingWindowIndexer(BaseIndexer):
    """Calculate ewm window bounds (the entire window)"""
    @Appender(get_window_bounds_doc)
    def get_window_bounds(self, num_values: int = ..., min_periods: int | None = ..., center: bool | None = ..., closed: str | None = ..., step: int | None = ...) -> tuple[np.ndarray, np.ndarray]:
        ...
    


