o
    l>j/                     @  s  d Z ddlmZ ddlmZ ddlmZ ddl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 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 ejdd	d
dZ	d-ddZ d.ddZ!d/ddZ"e	# ej$d
dde!d	dfd0ddZ%e	j&e
dd	e"d  e	j&ed!d	e"d  e	j&ed"d	e"d  e	j&ed#d	e"d  e	j&ed$d	e"d  e	j&ed%d	e"d  e	j&ed&d	e"d  e	j&ed'd	e"d  e	j&ed(d	e"d  e	j&ed)d	e"d  d1d+d,Z'dS )2z0Typer-based command line interface for pyicloud.    )annotations)PackageNotFoundErrorversionN)app)CLIAbortz-Command line interface for pyicloud services.TF)helpno_args_is_helppretty_exceptions_show_localsreturnstrc                   C  s    zt dW S  ty   Y dS w )z.Return the installed pyicloud package version.pyicloudunknown)package_versionr    r   r   E/home/thesage/.local/lib/python3.10/site-packages/pyicloud/cli/app.py_installed_version   s
   
r   valueboolNonec                 C  s   | rt t  t  dS )z.Print the installed pyicloud version and exit.N)typerechor   Exit)r   r   r   r   _version_callback&   s   r   ctxtyper.Contextc                 C  s$   | j du rt|   t dS )z:Show mounted group help when invoked without a subcommand.N)invoked_subcommandr   r   get_helpr   )r   r   r   r   _group_root.   s   
r   z	--versionz-Show the installed pyicloud version and exit.)r   callbackis_eagerr   c                 C  s   dS )z3Handle root CLI options before subcommand dispatch.Nr   r   r   r   r   root_callback6   s    r!   account)nameinvoke_without_commandr   authdevicescalendarcontactsdrivephotoshidemyemail	remindersnotesintc               
   C  sF   zt   W dS  ty" }  ztjt| dd W Y d} ~ dS d} ~ ww )zRun the Typer application.TerrN   r   )r   r   r   r   r   r/   r   r   r   maind   s   r2   )r   r   )r   r   r   r   )r   r   r   r   )r   r   r   r   )r   r.   )(__doc__
__future__r   importlib.metadatar   r   r   r   pyicloud.cli.commands.accountr   account_apppyicloud.cli.commands.authauth_apppyicloud.cli.commands.calendarcalendar_apppyicloud.cli.commands.contactscontacts_apppyicloud.cli.commands.devicesdevices_apppyicloud.cli.commands.drive	drive_app!pyicloud.cli.commands.hidemyemailhidemyemail_apppyicloud.cli.commands.notes	notes_apppyicloud.cli.commands.photos
photos_apppyicloud.cli.commands.remindersreminders_apppyicloud.cli.contextr   Typerr   r   r   r   Optionr!   	add_typerr2   r   r   r   r   <module>   s    

	
