from pandas._libs import  Timedelta as Timedelta
from pandas.core.accessor import delegate_names as delegate_names
from pandas.core.arrays import datetimelike as dtl
from pandas.core.arrays.timedeltas import TimedeltaArray as TimedeltaArray

from pandas.core.dtypes.missing import is_valid_nat_for_dtype as is_valid_nat_for_dtype, isna as isna
from pandas.core.indexes.base import Index as Index, maybe_extract_name as maybe_extract_name
from pandas.core.indexes.datetimelike import DatetimeIndexOpsMixin as DatetimeIndexOpsMixin, DatetimeTimedeltaMixin as DatetimeTimedeltaMixin, DatetimelikeDelegateMixin as DatetimelikeDelegateMixin
from pandas.core.indexes.extension import inherit_names as inherit_names
from pandas.tseries.frequencies import to_offset as to_offset
from pandas.util._decorators import Appender as Appender, Substitution as Substitution
from typing import Any, Optional

class TimedeltaDelegateMixin(DatetimelikeDelegateMixin): ...

class TimedeltaIndex(DatetimeTimedeltaMixin, dtl.TimelikeOps, TimedeltaDelegateMixin):
    def __new__(cls, data: Optional[Any] = ..., unit: Optional[Any] = ..., freq: Optional[Any] = ..., closed: Optional[Any] = ..., dtype: Any = ..., copy: bool = ..., name: Optional[Any] = ...) -> Any: ...
    def astype(self, dtype: Any, copy: bool = ...) -> Any: ...
    def get_value(self, series: Any, key: Any) -> Any: ...
    def get_value_maybe_box(self, series: Any, key: Timedelta) -> Any: ...
    def get_loc(self, key: Any, method: Optional[Any] = ..., tolerance: Optional[Any] = ...) -> Any: ...
    def searchsorted(self, value: Any, side: str = ..., sorter: Optional[Any] = ...) -> Any: ...
    def is_type_compatible(self, typ: Any) -> bool: ...
    @property
    def inferred_type(self) -> str: ...
    def insert(self, loc: Any, item: Any) -> Any: ...

def timedelta_range(start: Any = ..., end: Any = ..., periods: Any = ..., freq: Any = ..., name: Any = ..., closed: Any = ...) -> TimedeltaIndex: ...
