
    $gO                     *    d dl mZmZ  G d de      Zy)    )	Component_explicitize_argsc                        e Zd ZdZg ZdgZdZd Zee	j                  e	j                  e	j                  e	j                  e	j                  e	j                  e	j                  f fd	       Z xZS )LogoutButtona  A LogoutButton component.
    Logout button to submit a form post request to the `logout_url` prop.
    Usage is intended for dash-deployment-server authentication.

    DDS usage:

    `dcc.LogoutButton(logout_url=os.getenv('DASH_LOGOUT_URL'))`

    Custom usage:

    - Implement a login mechanism.
    - Create a flask route with a post method handler.
    `@app.server.route('/logout', methods=['POST'])`
      - The logout route should perform what's necessary for the user to logout.
      - If you store the session in a cookie, clear the cookie:
      `rep = flask.Response(); rep.set_cookie('session', '', expires=0)`

    - Create a logout button component and assign it the logout_url
    `dcc.LogoutButton(logout_url='/logout')`

    See https://dash.plotly.com/dash-core-components/logout_button
    for more documentation and examples.

    Keyword arguments:

    - id (string; optional):
        Id of the button.

    - className (string; optional):
        CSS class for the button.

    - label (string; default 'Logout'):
        Text of the button.

    - loading_state (dict; optional):
        Object that holds the loading state object coming from
        dash-renderer.

        `loading_state` is a dict with keys:

        - component_name (string; optional):
            Holds the name of the component that is loading.

        - is_loading (boolean; optional):
            Determines if the component is loading or not.

        - prop_name (string; optional):
            Holds which property is loading.

    - logout_url (string; optional):
        Url to submit a post logout request.

    - method (string; default 'post'):
        Http method to submit the logout form.

    - style (dict; optional):
        Style of the button.childrendash_core_componentsc                     g d| _         g | _        g d| _        g | _        |j	                  d      }	t               }
|
j                  |       |	D ci c]  }||
|   
 }}t        t        | &  di | y c c}w )N)id	classNamelabelloading_state
logout_urlmethodstyle_explicit_args )
_prop_names_valid_wildcard_attributesavailable_propertiesavailable_wildcard_propertiespoplocalsupdatesuperr   __init__)selfr
   r   r   r   r   r   r   kwargsr   _localskargs	__class__s                R/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/dash/dcc/LogoutButton.pyr   zLogoutButton.__init__F   s    
 +-'%
! .0*$45(v'56!71:66lD*2T2 7s   A5)__name__
__module____qualname____doc___children_props_base_nodes
_namespace_typer   r   	UNDEFINEDr   __classcell__)r!   s   @r"   r   r      st    8 t O,K'JE !!&&!!""%%))$3 $3    r   N)dash.development.base_componentr   r   r   r   r-   r"   <module>r/      s    Ie39 e3r-   