""" Rich Choice Objects for Reviews Domain This module defines all choice objects for the reviews domain, using the RichChoices pattern for consistent UI rendering and validation. """ from apps.core.choices import ChoiceCategory, RichChoice from apps.core.choices.registry import register_choices # ============================================================================ # Rating Value Choices (1-5 stars) # ============================================================================ RATING_VALUES = [ RichChoice( value="1", label="1 Star", description="Poor rating", metadata={ "color": "red", "icon": "star", "css_class": "bg-red-100 text-red-800", "sort_order": 1, "numeric_value": 1, "star_count": 1, }, category=ChoiceCategory.CLASSIFICATION, ), RichChoice( value="2", label="2 Stars", description="Below average rating", metadata={ "color": "orange", "icon": "star", "css_class": "bg-orange-100 text-orange-800", "sort_order": 2, "numeric_value": 2, "star_count": 2, }, category=ChoiceCategory.CLASSIFICATION, ), RichChoice( value="3", label="3 Stars", description="Average rating", metadata={ "color": "yellow", "icon": "star", "css_class": "bg-yellow-100 text-yellow-800", "sort_order": 3, "numeric_value": 3, "star_count": 3, }, category=ChoiceCategory.CLASSIFICATION, ), RichChoice( value="4", label="4 Stars", description="Good rating", metadata={ "color": "lime", "icon": "star", "css_class": "bg-lime-100 text-lime-800", "sort_order": 4, "numeric_value": 4, "star_count": 4, }, category=ChoiceCategory.CLASSIFICATION, ), RichChoice( value="5", label="5 Stars", description="Excellent rating", metadata={ "color": "green", "icon": "star", "css_class": "bg-green-100 text-green-800", "sort_order": 5, "numeric_value": 5, "star_count": 5, }, category=ChoiceCategory.CLASSIFICATION, ), ] def register_reviews_choices() -> None: """Register all reviews domain choices with the global registry.""" register_choices( name="rating_values", choices=RATING_VALUES, domain="reviews", description="Rating values for reviews (1-5 stars)", ) # Auto-register choices when module is imported register_reviews_choices()