
    wg                        d dl mZ d dlmZ d dlmZ d dlmZmZ  G d dej	                  Z
 G d dej                  Z G d	 d
ej	                  Z G d dej	                  Z G d dej	                  Z G d dej                  ZdS )    )serializers)Font)ColorStyles)IconSizeMarginBlockc                   J    e Zd Z ej        d          Z G d d          ZdS )FontSerializerFrequiredc                       e Zd ZeZdZdS )FontSerializer.Meta)namelinkN)__name__
__module____qualname__r   modelfields     +/var/www/html/cms/web/styles/serializers.pyMetar      s        !r   r   N)r   r   r   r   	CharFieldr   r   r   r   r   r	   r	      sQ         ; %000D" " " " " " " " " "r   r	   c                       e Zd Z e            Z ej                    Z ej                    Z ej                    Z	 ej                    Z
 ej                    Z ej                    ZdS )TextSerializerN)r   r   r   r	   fontr   r   fontSizefontSizeMobile
fontWeightfontWeightMobilecolorfontColorInvertedr   r   r   r   r      s        >D${$&&H*[*,,N&&((J,{,..!K!##E--//r   r   c                   (    e Zd Z G d d          ZdS )ColorsSerializerc                       e Zd ZeZdZdS )ColorsSerializer.Meta)background_color
main_colorsecondary_colorsecond_background_colorN)r   r   r   r   r   r   r   r   r   r   r&      s        ar   r   Nr   r   r   r   r   r   r   r$   r$      sF        b b b b b b b b b br   r$   c                   (    e Zd Z G d d          ZdS )IconSizeSerializerc                       e Zd ZeZdZdS )IconSizeSerializer.Meta)widthheightN)r   r   r   r   r   r   r   r   r   r   r/   !   s        $r   r   Nr+   r   r   r   r-   r-       s<        % % % % % % % % % %r   r-   c                   (    e Zd Z G d d          ZdS )MarginBlockSerializerc                       e Zd ZeZdZdS )MarginBlockSerializer.Meta)
margin_topmargin_bottomN)r   r   r   r   r   r   r   r   r   r   r5   '   s        0r   r   Nr+   r   r   r   r3   r3   &   s<        1 1 1 1 1 1 1 1 1 1r   r3   c                       e Zd Z ej                    Z ej                    Z ej                    Z ej                    Z	 ej                    Z
 ej                    Z ej                    Z ej                    Z ej                    Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej                    Z ej                    Z ej                    Z ej                    Z ej                    Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z  ej        d          Z! ej        d          Z" ej        d          Z# ej        d          Z$ ej        d          Z% ej        d          Z& ej'        d          Z( ej'        d          Z) ej        d          Z* ej        d          Z+ ej        d          Z,d Z-d Z.d Z/d Z0d Z1dS )	CustomStylesSerializerFr
   c                 :    	 d|j         z  S # t          $ r Y d S w xY wNd   )columnsAttributeErrorselfobjs     r   get_column_widthz'CustomStylesSerializer.get_column_width^   s6    	#+%% 	 	 	DD	   	 
c                 :    	 d|j         z
  S # t          $ r Y d S w xY wr;   )darkness_bottomr>   r?   s     r   get_darkness_bottomz*CustomStylesSerializer.get_darkness_bottomd   s7    	,,, 	 	 	DD	rC   c                     	 d                     d t          |j                  D                       S # t          $ r Y d S w xY w)N c                     g | ]}d S )1frr   ).0is     r   
<listcomp>z6CustomStylesSerializer.get_columns.<locals>.<listcomp>l   s    ???qU???r   )joinranger=   r>   r?   s     r   get_columnsz"CustomStylesSerializer.get_columnsj   sT    	88??E#+,>,>???@@@ 	 	 	44	s   03 
A Ac                 (    |j         d S |j         dz  S r;   photo_darknessr?   s     r   get_background_image_darknessz4CustomStylesSerializer.get_background_image_darknessp   s    %4!C''r   c                 "    |j         }|d|z
  }|S r;   rR   )r@   rA   rS   s      r   get_photo_darknessz)CustomStylesSerializer.get_photo_darknessv   s     +% >1Nr   N)2r   r   r   r   r   r6   r7   r'   SerializerMethodFieldrS   header_sizeheader_size_mobileheader_thicknessheader_thickness_mobileheader_colorsubheader_sizesubheader_size_mobilesubheader_thicknesssubheader_thickness_mobilesubheader_colormain_text_sizemain_text_size_mobilemain_text_thicknessmain_text_thickness_mobilemain_text_colorexplanation_text_sizeexplanation_text_size_mobileexplanation_text_thickness!explanation_text_thickness_mobileexplanation_text_colorr=   
icon_coloricon_background_colorbackground_image_darkness
icon_widthicon_heightborder_radiusbutton_colorrE   BooleanFieldadd_annotation
add_buttonswiper_columnscolumn_width
refs_colorrB   rF   rP   rT   rV   r   r   r   r9   r9   ,   sH       &&((J)K)++M,{,..6[688N'+'))K..00,{,..3k355(;(**L*[*E:::N1K15AAA/+/???!6!6!F!F!F+k+U;;;O*[*,,N1K133/+/11!6!6!8!8+k+--O1K15AAA#8;#8%#H#H#H !6!6!F!F!F(=(=u(M(M(M%2[2EBBB/k/???G&&666J1K15AAA A A5 Q Q Q&&666J'+'777K)K)5999M(;(%888L7k7GGGO-[-u===N))5999J*[*E:::N4;4eDDDL&&666J      ( ( (    r   r9   N)rest_frameworkr   *infrastructure.persistence.models.settingsr   6infrastructure.persistence.models.styles.colors.colorsr   .infrastructure.persistence.models.styles.otherr   r   ModelSerializerr	   
Serializerr   r$   r-   r3   r9   r   r   r   <module>r      s}   & & & & & & ; ; ; ; ; ; N N N N N N P P P P P P P P" " " " "[0 " " "0 0 0 0 0[+ 0 0 0b b b b b{2 b b b% % % % %4 % % %1 1 1 1 1K7 1 1 1O O O O O[3 O O O O Or   