"""Extended Textual Footer widget."""

from typing import Any
from typing import Iterable

from textual import events
from textual import widgets

from .._extensions import Callback
from .._extensions import WidgetExtension


class Footer(widgets.Footer, WidgetExtension):
    """An extended simple footer widget which docks itself to the bottom of the parent container."""

    def __init__(
        self,
        styles: dict[str, Any] | None = None,
        disabled_messages: Iterable[type[events.Message]] | None = None,
        callbacks: dict[str, Callback] | None = None,
    ) -> None:
        """Initialize the footer widget.

        Args:
            styles: Local inline styles to apply on top of the class' styles for only this instance.
            disabled_messages: List of messages to disable on this widget instance only.
            callbacks: Mapping of callbacks to send messages to instead of sending to default handler.
        """
        super().__init__()
        self.__extend_widget__(
            styles=styles,
            disabled_messages=disabled_messages,
            callbacks=callbacks,
        )
