U
    Zf                     @   s$   d dl mZmZ G dd deZdS )    )	Component_explicitize_argsc                       sH   e Zd ZdZg ZdgZdZd Zee	j
e	j
e	j
e	j
f fdd	Z  ZS )Downloada  A Download component.
    The Download component opens a download dialog when the data property changes.

    Keyword arguments:

    - id (string; optional):
        The ID of this component, used to identify dash components in
        callbacks.

    - base64 (boolean; default False):
        Default value for base64, used when not set as part of the data
        property.

    - data (dict; optional):
        On change, a download is invoked.

        `data` is a dict with keys:

        - base64 (boolean; optional):
            Set to True, when data is base64 encoded.

        - content (string; required):
            File content.

        - filename (string; required):
            Suggested filename in the download dialogue.

        - type (string; optional):
            Blob type, usually a MIME-type.

    - type (string; default 'text/plain'):
        Default value for type, used when not set as part of the data
        property.childrenZdash_core_componentsc                    sj   ddddg| _ g | _ddddg| _g | _|d}t   |  fdd|D }tt| j	f | d S )Nidbase64datatype_explicit_argsc                    s   i | ]}| | qS  r   ).0kZ_localsr   5/tmp/pip-unpacked-wheel-47crqvv_/dash/dcc/Download.py
<dictcomp>>   s      z%Download.__init__.<locals>.<dictcomp>)
Z_prop_namesZ_valid_wildcard_attributesZavailable_propertiesZavailable_wildcard_propertiespoplocalsupdatesuperr   __init__)selfr   r   r   r	   kwargsr
   args	__class__r   r   r   .   s    	

zDownload.__init__)__name__
__module____qualname____doc__Z_children_propsZ_base_nodes
_namespace_typer   r   	UNDEFINEDr   __classcell__r   r   r   r   r      s   "r   N)Zdash.development.base_componentr   r   r   r   r   r   r   <module>   s   