o
    ȟ1i.	                     @   sp  d dl mZ d dlmZmZmZ d dlmZmZ d dl	m
Z
 d dlmZmZmZ d dlmZ eddZejd	eed
ge
deeeefdefddZejd	e
deeeefddZejde
deeeefdefddZejde
deeeefdedefddZejde
deeeefdefddZejde
deeeefdefddZdS )    )	Annotated)	APIRouterDependsForm)get_userrequire_role)GenericResponse)AddParticipantSchemaParticipantUpdateSchemaParticipantProfileSchema)ParticipantServicez/participant)prefix/parent)dependenciesresponse_modelrequestc                    s   | ||  ddiS )NmessagezParticipant added successfully.)add_participant)r   userservice r   /app/api/participant.pyr      s   r   )r   c                    s   | | }d|dS Nz#Participant populated successfully.)r   data)Zfetch_current_participant)r   r   r   r   r   r   #get_all_participant_by_current_user      

r   z/{participant_id}participant_idc                    s   d| | dS r   )Zfetch_participant_detailsr   r   r   r   r   r   participant_details   s   r   c                    s   | | | ddiS )Nr   z!Participant updated successfully.)Zupdate_participant_from_parent)r   r   r   r   r   r   r   update_participant   s   r    c                    s   | |  ddiS )Nr   z!Participant deleted successfully.)delete_participantr   r   r   r   r!   %   s   
r!   z/parent/{parent_id}	parent_idc                    s   | | }d|dS r   ) get_all_participant_by_parent_id)r"   r   r   r   r   r   r   r#   +   r   r#   N)typingr   fastapir   r   r   core.security.authenticationr   r   schemar   Zschema.participantr	   r
   r   Zservices.participantr   participant_routerpostr   getr   intr   putr    deleter!   r#   r   r   r   r   <module>   s*    
"