U
    ×Zßfé
  ã                   @   s$   d dl mZmZ G dd„ deƒZdS )é    )Ú	ComponentÚ_explicitize_argsc                       sP   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f‡ fdd„	ƒZ‡  ZS )ÚLocationaÂ  A Location component.
    Update and track the current window.location object through the window.history state.
    Use in conjunction with the `dash_core_components.Link` component to make apps with multiple pages.

    Keyword arguments:

    - id (string; required):
        The ID of this component, used to identify dash components in
        callbacks. The ID needs to be unique across all of the components
        in an app.

    - hash (string; optional):
        hash in window.location - e.g., "#myhash".

    - href (string; optional):
        href in window.location - e.g.,
        "/my/full/pathname?myargument=1#myhash".

    - pathname (string; optional):
        pathname in window.location - e.g., "/my/full/pathname".

    - refresh (a value equal to: 'callback-nav' | boolean; default True):
        Use `True` to navigate outside the Dash app or to manually refresh
        a page. Use `False` if the same callback that updates the Location
        component is also updating the page content - typically used in
        multi-page apps that do not use Pages. Use 'callback-nav' if you
        are updating the URL in a callback, or a different callback will
        respond to the new Location with updated content. This is typical
        with multi-page apps that use Pages. This will allow for
        navigating to a new page without refreshing the page.

    - search (string; optional):
        search in window.location - e.g., "?myargument=1".ÚchildrenZdash_core_componentsc                    s”   ddddddg| _ g | _ddddddg| _g | _| d¡}tƒ ‰ ˆ  |¡ ‡ fdd	„|D ƒ}	d
D ]}
|
|	kr`td|
 d ƒ‚q`tt	| ƒj
f |	Ž d S )NÚidÚhashÚhrefÚpathnameÚrefreshÚsearchÚ_explicit_argsc                    s   i | ]}|ˆ | “qS © r   )Ú.0Úk©Z_localsr   ú5/tmp/pip-unpacked-wheel-47crqvv_/dash/dcc/Location.pyÚ
<dictcomp>G   s      z%Location.__init__.<locals>.<dictcomp>)r   zRequired argument `z` was not specified.)Z_prop_namesZ_valid_wildcard_attributesZavailable_propertiesZavailable_wildcard_propertiesÚpopÚlocalsÚupdateÚ	TypeErrorÚsuperr   Ú__init__)Úselfr   r	   r   r   r   r
   Úkwargsr   Úargsr   ©Ú	__class__r   r   r   .   s$    ú

zLocation.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Z_children_propsZ_base_nodesÚ
_namespaceÚ_typer   r   ZREQUIREDÚ	UNDEFINEDr   Ú__classcell__r   r   r   r   r      s   "ùr   N)Zdash.development.base_componentr   r   r   r   r   r   r   Ú<module>   s   