
    :)di]                        d dl mZ d dlZd dlmZmZmZmZmZ d dl	Z	er$d dl
mZ d dlmZ d dlmZ d dlmZ d dlmZ d d	lmZ  G d
 de	j                  Z G d dee	j                  Z G d dee	j                  ZdS )    )annotationsN)TYPE_CHECKINGAnyListOptionalUnion)Columns)	StyleType)RichContext)RichHelpFormatter)RichPanelRow)RichOptionPanelc                  N     e Zd ZdZddddd fdZd fdZddZ	 dddZ xZS )RichParameterz
    A parameter to a command comes in two versions: they are either
    :class:`Option`\s or :class:`Argument`\s.  Other subclasses are currently
    not supported by design as some of the internals for parsing are
    intentionally not finalized.
    N)panelhelp
help_styleargsr   r   Optional[Union[str, List[str]]]r   Optional[str]r   Optional['StyleType']kwargsc               
    t                      j        |i | || _        |rQt          j        |          }|                    d          }|r&t          |t                    rd| dnd}|||z   n|}|| _        || _	        dS )zCreate RichParameter instance.
deprecatedz(DEPRECATED: )z(DEPRECATED)N)
super__init__r   inspectcleandocget
isinstancestrr   r   )	selfr   r   r   r   r   r   deprecated_message	__class__s	           `/var/www/menimich/repos/protonApp/venv/lib/python3.11/site-packages/rich_click/rich_parameter.pyr   zRichParameter.__init__   s     	$)&)))
 	]#D))DL11J ]FPQ[]`FaFa%u%BZ%B%B%B%Bgu"484Dt000J\	$    returndict[str, Any]c                ~    t                                                      }|                    d| j                   |S )z
        Gather information that could be useful for a tool generating
        user-facing documentation.

        Use :meth:`click.Context.to_info_dict` to traverse the entire
        CLI structure.
        r   )r   to_info_dict
setdefaultr   )r#   infor%   s     r&   r+   zRichParameter.to_info_dict3   s5     ww##%%	***r'   ctx'RichContext'	formatter'RichHelpFormatter'	'Columns'c                (    ddl m}  || ||          S )z*Get the rich help text for this parameter.r   )get_help_parameter)rich_click.rich_help_renderingr4   )r#   r.   r0   r4   s       r&   get_rich_helpzRichParameter.get_rich_help?   s)    EEEEEE!!$Y777r'   Optional['RichOptionPanel']'RichPanelRow'c                *    ddl m}  || |||          S )zBCreate a row for the rich table corresponding with this parameter.r   )get_parameter_rich_table_row)r5   r:   )r#   r.   r0   r   r:   s        r&   get_rich_table_rowz RichParameter.get_rich_table_rowE   s.     	POOOOO++D#y%HHHr'   )
r   r   r   r   r   r   r   r   r   r   )r(   r)   )r.   r/   r0   r1   r(   r2   )N)r.   r/   r0   r1   r   r7   r(   r8   )	__name__
__module____qualname____doc__r   r+   r6   r;   __classcell__)r%   s   @r&   r   r      s          26",0% % % % % % % %0
 
 
 
 
 
8 8 8 8 .2		I 	I 	I 	I 	I 	I 	I 	I 	Ir'   r   c                      e Zd ZdZdS )RichArgumenta  
    Arguments are positional parameters to a command.  They generally
    provide fewer features than options but can have infinite ``nargs``
    and are required by default.

    All parameters are passed onwards to the constructor of :class:`Parameter`.
    Nr<   r=   r>   r?    r'   r&   rB   rB   Q   s           r'   rB   c                      e Zd ZdZdS )
RichOptionz
    Options are usually optional values on the command line and
    have some extra features that arguments don't have.

    All other parameters are passed onwards to the parameter constructor.
    NrC   rD   r'   r&   rF   rF   [   s           r'   rF   )
__future__r   r   typingr   r   r   r   r   clickrich.columnsr	   
rich.styler
   rich_click.rich_contextr   rich_click.rich_help_formatterr   r5   r   rich_click.rich_panelr   	Parameterr   ArgumentrB   OptionrF   rD   r'   r&   <module>rR      sd   " " " " " "  < < < < < < < < < < < < < <   6$$$$$$$$$$$$333333@@@@@@;;;;;;555555;I ;I ;I ;I ;IEO ;I ;I ;I|    =%.            r'   