from .base import BaseTemplateExtension as BaseTemplateExtension, TemplateFunction as TemplateFunction
from collections.abc import Iterable, MutableSequence
from homeassistant.helpers.template import TemplateEnvironment as TemplateEnvironment
from typing import Any

class CollectionExtension(BaseTemplateExtension):
    def __init__(self, environment: TemplateEnvironment) -> None: ...
    def flatten(self, value: Iterable[Any], levels: int | None = None) -> list[Any]: ...
    def shuffle(self, *args: Any, seed: Any = None) -> MutableSequence[Any]: ...
    def intersect(self, value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
    def difference(self, value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
    def union(self, value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
    def symmetric_difference(self, value: Iterable[Any], other: Iterable[Any]) -> list[Any]: ...
    def to_set(self, value: Any) -> set[Any]: ...
    def to_tuple(self, value: Any) -> tuple[Any, ...]: ...
    def is_list(self, value: Any) -> bool: ...
    def is_set(self, value: Any) -> bool: ...
    def is_tuple(self, value: Any) -> bool: ...
