"""Autogenerated file: DO NOT EDIT!"""
import typing  # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED  # noqa: F401


class Pager(Component):
    """
    Paging for dazzler apps.
    """
    _aspect_keys = []
    _children = []
    total_items = Aspect(required=True, docstring="The total items in the set.")  # noqa: E501
    items_per_page = Aspect(default=10, docstring="The number of items a page contains. (default=10)")  # noqa: E501
    style = Aspect()
    class_name = Aspect()
    page_style = Aspect(docstring="Style for the page numbers.")
    page_class_name = Aspect(docstring="CSS class for the page numbers.")
    pages_displayed = Aspect(default=10, docstring="The number of pages displayed by the pager. (default=10)")  # noqa: E501
    pages = Aspect(docstring="Read only, the currently displayed pages numbers.")  # noqa: E501
    current_page = Aspect(default=1, docstring="The current selected page. (default=1)")  # noqa: E501
    total_pages = Aspect(docstring="Set by total_items / items_per_page")
    start_offset = Aspect(docstring="The starting index of the current pageCan be used to slice data eg: data[start_offset: end_offset]")  # noqa: E501
    end_offset = Aspect(docstring="The end index of the current page.")

    def __init__(
            self,
            total_items: typing.Union[float, int],
            items_per_page: typing.Optional[typing.Union[float, int]] = 10,
            style: typing.Optional[typing.Dict] = UNDEFINED,
            class_name: typing.Optional[str] = UNDEFINED,
            page_style: typing.Optional[typing.Dict] = UNDEFINED,
            page_class_name: typing.Optional[str] = UNDEFINED,
            pages_displayed: typing.Optional[typing.Union[float, int]] = 10,
            pages: typing.Optional[typing.List] = UNDEFINED,
            current_page: typing.Optional[typing.Union[float, int]] = 1,
            total_pages: typing.Optional[typing.Union[float, int]] = UNDEFINED,  # noqa: E501
            start_offset: typing.Optional[typing.Union[float, int]] = UNDEFINED,  # noqa: E501
            end_offset: typing.Optional[typing.Union[float, int]] = UNDEFINED,
            identity: str = None
    ):
        """
        :param total_items: The total items in the set.
        :param items_per_page: The number of items a page contains.
            (default=10)
        :param style:
        :param class_name:
        :param page_style: Style for the page numbers.
        :param page_class_name: CSS class for the page numbers.
        :param pages_displayed: The number of pages displayed by the pager.
            (default=10)
        :param pages: Read only, the currently displayed pages numbers.
        :param current_page: The current selected page. (default=1)
        :param total_pages: Set by total_items / items_per_page
        :param start_offset: The starting index of the current page Can be
            used to slice data eg: data[start_offset: end_offset]
        :param end_offset: The end index of the current page.
        """
        Component.__init__(self, locals(), identity)
