
    i                        d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ erddlmZ dd	lmZ  G d
 de	          ZdgZdS )z6Selection of all components with the correct adapters.    )annotations)TYPE_CHECKINGSequence)
Occurrence)SelectComponents)ComponentsWithName)Series)	Component)ComponentAdapterc                  Z    e Zd ZdZedd            Zedd            Zeee	fddZ
ddZdS )AllKnownComponentsz'Group all known components into series.returnSequence[ComponentAdapter]c                    t           j        S )z$Return all known component adapters.)r   component_adapters)selfs    ^/root/projects/butler/venv/lib/python3.11/site-packages/recurring_ical_events/selection/all.py_component_adaptersz&AllKnownComponents._component_adapters   s     "44    	list[str]c                P    d | j         D             }|                                 |S )z.Return the names of the components to collect.c                6    g | ]}|                                 S  )component_name).0adapters     r   
<listcomp>z,AllKnownComponents.names.<locals>.<listcomp>   s$    SSSw'((**SSSr   )r   sort)r   results     r   nameszAllKnownComponents.names   s-     TS$:RSSSr   seriestype[Series]
occurrencetype[Occurrence]	collectortype[ComponentsWithName]Nonec                0    || _         || _        || _        dS )a8  Collect all known components and overide the series and occurrence.

        series - the Series class to override that is queried for Occurrences
        occurrence - the occurrence class that creates the resulting components
        collector - if you want to override the SelectComponentsByName class
        N)_series_occurrence
_collector)r   r!   r#   r%   s       r   __init__zAllKnownComponents.__init__!   s     %#r   sourcer
   suppress_errorstuple[Exception]Sequence[Series]c                    g }| j         D ]M}|                     || j        | j                  }|                    |                    ||                     N|S )z<Collect the components from the source groups into a series.)r!   r#   )r    r+   r)   r*   extendcollect_series_from)r   r-   r.   r   namer%   s         r   r3   z&AllKnownComponents.collect_series_from1   sl     J 	R 	RDT\d6F (  I MM)77PPQQQQr   N)r   r   )r   r   )r!   r"   r#   r$   r%   r&   r   r'   )r-   r
   r.   r/   r   r0   )__name__
__module____qualname____doc__propertyr   r    r	   r   r   r,   r3   r   r   r   r   r      s        115 5 5 X5    X  &'1.@	$ $ $ $ $ 
 
 
 
 
 
r   r   N)r8   
__future__r   typingr   r    recurring_ical_events.occurrencer   $recurring_ical_events.selection.baser   $recurring_ical_events.selection.namer   recurring_ical_events.seriesr	   icalendar.calr
   (recurring_ical_events.adapters.componentr   r   __all__r   r   r   <module>rC      s    < < " " " " " " * * * * * * * * 7 7 7 7 7 7 A A A A A A C C C C C C / / / / / / J''''''IIIIII) ) ) ) )) ) ) )X  
 r   