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


class Login(Component):
    """
    A login form to include on dazzler pages.

    :CSS:

        ``dazzler-auth-login``
        - ``login-field``
        - ``login-label``
        - ``login-input``
        - ``login-username``
        - ``login-password``
        - ``login-button``
    """
    _aspect_keys = []
    _children = []
    login_url = Aspect(required=True, docstring="The url to perform login.")
    next_url = Aspect(docstring="Redirect to this page after login.")
    method = Aspect(default='POST', docstring="Method to submit the login form. (default='POST')")  # noqa: E501
    username_label = Aspect(default='Username', docstring="The label to show before the. (default='Username')")  # noqa: E501
    password_label = Aspect(default='Password', docstring="Label to replace the password. (default='Password')")  # noqa: E501
    submit_label = Aspect(default='Login', docstring="Label for the submit button. (default='Login')")  # noqa: E501
    horizontal = Aspect(docstring="Style the form with the fields side by side.")  # noqa: E501
    bordered = Aspect(docstring="Apply a border around the")
    placeholder_labels = Aspect(docstring="Put the label in placeholder attribute instead of a `<label>` element.")  # noqa: E501
    header = Aspect(children=True, docstring="Included as first child of the form.Wrapped under div with CSS class ``login-header``")  # noqa: E501
    footer = Aspect(children=True, docstring="Included at bottom of the login form.Wrapped under div with CSS class ``login-footer``")  # noqa: E501
    errors = Aspect(docstring="Form errors")
    class_name = Aspect()
    style = Aspect()

    def __init__(
            self,
            login_url: str,
            next_url: typing.Optional[str] = UNDEFINED,
            method: typing.Optional[str] = 'POST',
            username_label: typing.Optional[str] = 'Username',
            password_label: typing.Optional[str] = 'Password',
            submit_label: typing.Optional[str] = 'Login',
            horizontal: typing.Optional[bool] = UNDEFINED,
            bordered: typing.Optional[bool] = UNDEFINED,
            placeholder_labels: typing.Optional[bool] = UNDEFINED,
            header: typing.Optional[typing.Union[str, int, float, Component, typing.List[typing.Union[str, int, float, Component]]]] = UNDEFINED,  # noqa: E501
            footer: typing.Optional[typing.Union[str, int, float, Component, typing.List[typing.Union[str, int, float, Component]]]] = UNDEFINED,  # noqa: E501
            errors: typing.Optional[typing.Dict] = UNDEFINED,
            class_name: typing.Optional[str] = UNDEFINED,
            style: typing.Optional[typing.Dict] = UNDEFINED,
            identity: str = None
    ):
        """
        :param login_url: The url to perform login.
        :param next_url: Redirect to this page after login.
        :param method: Method to submit the login form. (default='POST')
        :param username_label: The label to show before the.
            (default='Username')
        :param password_label: Label to replace the password.
            (default='Password')
        :param submit_label: Label for the submit button. (default='Login')
        :param horizontal: Style the form with the fields side by side.
        :param bordered: Apply a border around the
        :param placeholder_labels: Put the label in placeholder attribute
            instead of a `<label>` element.
        :param header: Included as first child of the form. Wrapped under
            div with CSS class ``login-header``
        :param footer: Included at bottom of the login form. Wrapped under
            div with CSS class ``login-footer``
        :param errors: Form errors
        :param class_name:
        :param style:
        """
        Component.__init__(self, locals(), identity)
