
    h-                     F   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
mZ d dlmZ d dlmZmZmZ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!m"Z"m#Z#m$Z$  ejJ                  e      Z& G d d e&d      ee      Z' G d d e&d      eee      Z(y)    )forms)ManyToOneRel)gettext_lazy)EntangledModelForm)AdminImageFormFieldFilerImageField)Image)AttributesFormFieldButtonGroupTagTypeFormFieldTemplateChoiceMixin   )settings)BackgroundFormMixin)HTMLFormField)first_choice)FrontendUIItem   )carousel)LinkFormMixin   )CAROUSEL_ASPECT_RATIO_CHOICESCAROUSEL_PAUSE_CHOICESCAROUSEL_TEMPLATE_CHOICESCAROUSEL_TRANSITION_CHOICESc                      e Zd ZdZ G d d      Z ej                   ed      e e	e       ed            Z
 ej                   ed      d ed	      
      Z ej                   ed      dd ed            Z ej                   ed      dd ed            Z ej                   ed      dd ed            Z ej                   ed      e e	e       ed       e ed                  Z ej                   ed      dd ed            Z ej                   ed      dd ed            Z ej                   ed      ej0                  ez   dej0                  d   d    ed       !      Z ej                   ed"      eded   d    ed#       e ed            $      Z eg d%&      Z e       Z y')(CarouselFormzc
    Components > "Carousel" Plugin
    https://getbootstrap.com/docs/5.0/components/carousel/
    c                        e Zd ZeZdg diZdZy)CarouselForm.Metaconfig)templatecarousel_aspect_ratiocarousel_controlscarousel_indicatorscarousel_intervalcarousel_keyboardcarousel_pausecarousel_ridecarousel_wrapcarousel_transition
attributestag_typeN__name__
__module____qualname__r   modelentangled_fieldsuntangled_fields     Y/home/dcms/DCMS/lib/python3.12/site-packages/djangocms_frontend/contrib/carousel/forms.pyMetar   !   s     
 )r6   r8   Layoutz9This is the template that will be used for the component.)labelchoicesinitial	help_textIntervali  zsThe amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.)r:   r<   r=   ControlsTFz)Adding in the previous and next controls.)r:   r<   requiredr=   
Indicatorsz)Adding in the indicators to the carousel.Keyboardz5Whether the carousel should react to keyboard events.PausezIf set to "hover", pauses the cycling of the carousel on "mouseenter" and resumes the cycling of the carousel on "mouseleave". If set to "false", hovering over the carousel won't pause it.text)property)attrs)r:   r;   r<   r=   widgetz
Auto startztAutoplays the carousel after the user manually cycles the first item. If "carousel", autoplays the carousel on load.WrapzBWhether the carousel should cycle continuously or have hard stops.zAspect ratior   zIDetermines width and height of the image according to the selected ratio.)r:   r;   r@   r<   r=   
Transitionz1Determines if slides change by sliding or fading.)r:   r;   r@   r<   r=   rG   )idzdata-bs-intervalzdata-bs-keyboardzdata-bs-pausezdata-bs-ridezdata-bs-wrap)excluded_keysN)!r/   r0   r1   __doc__r8   r   ChoiceField_r   r   r!   IntegerFieldr%   BooleanFieldr#   r$   r&   r   r   dictr'   r(   r)   r   EMPTY_CHOICEr   r"   r   r*   r
   r+   r   r-   r5   r6   r7   r   r      s6   
) )& !u  k)67OP	H +**
mH
 +**
m?@	 -%,,o?@	 +**
mKL	 'U&&j&34
 v!67N 'E&&oI
	M 'E&&iXY	M .E--%%(EE%%a(+_` ,%++o++A.q1GHv!67 %
	J  !Hr6   r   Carouselc                       e Zd ZdZ G d d      ZdZ e eee	d      e	j                  j                         d ed      d      Z e ed	      dd
 ed            Z e       Z e       Zy)CarouselSlideFormz`
    Components > "Slide" Plugin
    https://getbootstrap.com/docs/5.0/components/carousel/
    c                        e Zd ZeZdg diZdZy)CarouselSlideForm.Metar    )carousel_imagecarousel_contentr+   r,   Nr.   r5   r6   r7   r8   rW      s     
 )r6   r8   TrJ   zSlide imageF)relquerysetto_field_namer:   r@   Content z.Content may also be added using child plugins.)r:   r@   r<   r=   N)r/   r0   r1   rL   r8   link_is_optionalr   r   r   r	   objectsallrN   rX   r   rY   r
   r+   r   r-   r5   r6   r7   rU   rU      s    
	) 	) (%6""$N %	lDE	 %&J!Hr6   rU   CarouselSlideN))djangor   django.db.models.fields.relatedr   django.utils.translationr   rN   entangled.formsr   filer.fields.imager   r   filer.modelsr	   djangocms_frontend.fieldsr
   r   r   r   r^   r   commonr   fieldsr   helpersr   modelsr   r   
link.formsr   	constantsr   r   r   r   	get_formsmixin_factoryr   rU   r5   r6   r7   <module>rr      s     8 6 . C  m m  ) # # $  &  #""8,m"=,.ACU m"`&"/"	&"r6   