o
    sg                      @   s   d Z ddlZddlmZmZ ddlmZmZmZ G dd deddZ	G d	d
 d
eZ
G dd deZG dd deZG dd deZdS )zEThis module contains the data classes for the presentation structure.    N)AnyDict)	BaseModelFieldroot_validatorc                   @   s   e Zd ZU dZedddZeed< edddZe	ee
f ed< edd	d
Zeed< ei dd
Ze
ed< eddedd ZdS )SlideContentzSlide content structure..z+Slide layout choice, i.e. Layout A, B, etc.titlelayoutz?For the given slide layout chosen, a filled out JSON to provideinformation_to_provideNzFFrom the selected layout, provide a description in text for the layoutdefaultr	   layout_in_textz&Extra information needed for the slideextraT)prec                 C   sH   dd | j  D }i }t|D ]}||vr||||< q||d< |S )z add extra information if needed.c                 S   s   h | ]
}|j d kr|j qS r   )alias).0field r   T/var/www/html/XCapMarket/services/ppt_generator/data_classes/presentation_outline.py	<setcomp>   s    z+SlideContent.build_extra.<locals>.<setcomp>r   )
__fields__valueslistpop)clsr   all_required_field_namesr   
field_namer   r   r   build_extra   s   zSlideContent.build_extra)__name__
__module____qualname____doc__r   r
   str__annotations__r   dictr   r   r   r   classmethodr   r   r   r   r   r   	   s"   
 r   allowr   c                   @   s   e Zd ZU dZedddZeed< edddZeed< edddZ	eed	< edd
dZ
eed< edddZee ed< edddZeed< edddZeed< dS )SlideLLMzSlide structure..zThe title of the slider   r	   zThe content of the slidecontentz'Data required for the slide to completedatazDesign for the powerpoint slide with respect to the data
         and content assume a 4:3 aspect ratio and 1920x1080 resolution.designz5Questions needed to be answered to complete the slide	questionsz%The order of the slide in the sectionslide_orderFzWhether the slide is modifiedr   
isModifiedN)r    r!   r"   r#   r   r	   r$   r%   r*   r+   r,   r-   r   r.   intr/   boolr   r   r   r   r)   )   s   
 r)   c                   @   sn   e Zd ZU dZedddZeed< edddZedB ed	< edd
dZ	e
e dB ed< edddZeed< dS )SectionLLMWithSlidesSection structure..The title of the sectionr   r	   N)What the content of the section should ber   r*   zXlist of slides for the section, include as many slides as deemed concise for the sectionslides,The order of the section in the presentationsection_order)r    r!   r"   r#   r   r	   r$   r%   r*   r6   r   r)   r8   r0   r   r   r   r   r2   :   s   
 r2   c                   @   sR   e Zd ZU dZedddZeed< edddZedB ed	< edd
dZ	e
ed< dS )Section_LLMr3   .r4   r   r	   Nr5   r   r*   r7   r8   )r    r!   r"   r#   r   r	   r$   r%   r*   r8   r0   r   r   r   r   r9   I   s   
 r9   c                   @   s*   e Zd ZU dZedddZee ed< dS )PresentationOutlinezPresentation structure..z$list of sections in the presentationr   sectionsN)	r    r!   r"   r#   r   r;   r   r9   r%   r   r   r   r   r:   T   s
   
 r:   )r#   uuidtypingr   r   pydantic.v1r   r   r   r   r)   r2   r9   r:   r   r   r   r   <module>   s     