""" Ecom verticals for creative variety. Angles, concepts, and motivators can be adapted to different verticals to increase diversity. """ from typing import Dict, List, Any, Optional import random # Vertical name -> suggested angle keys (must exist in data.angles ANGLES) ECOM_VERTICALS: List[Dict[str, Any]] = [ {"key": "fashion", "name": "Fashion & Apparel", "angle_hint": "trending_now, confidence_boost, people_like_you, viral_popularity"}, {"key": "beauty", "name": "Beauty & Skincare", "angle_hint": "pride_self_worth, testimonials, confidence_boost, real_stories"}, {"key": "supplements", "name": "Supplements & Health", "angle_hint": "expert_backed, relief_escape, modern_solution, stress_relief"}, {"key": "fitness", "name": "Fitness & Wellness", "angle_hint": "shortcut, pain_point, empowerment, hope_optimism"}, {"key": "electronics", "name": "Electronics & Tech", "angle_hint": "modern_solution, smart_investment, comparison_logic, fast_instant"}, {"key": "home_goods", "name": "Home & Living", "angle_hint": "peace_of_mind, save_money, lifestyle_match, risk_free"}, {"key": "pets", "name": "Pet Products", "angle_hint": "emotional_connection, guilt_responsibility, relief_escape, community_trust"}, {"key": "food_beverage", "name": "Food & Beverage", "angle_hint": "nostalgia, word_of_mouth, simple_easy, mass_adoption"}, {"key": "jewelry_accessories", "name": "Jewelry & Accessories", "angle_hint": "pride_self_worth, personal_relevance, lifestyle_match, custom_fit"}, {"key": "subscription", "name": "Subscription & Memberships", "angle_hint": "save_money, limited_time, community_trust, hassle_free"}, ] VERTICAL_KEYS = [v["key"] for v in ECOM_VERTICALS] def get_random_vertical() -> Dict[str, Any]: """Return a random ecom vertical for variety.""" return random.choice(ECOM_VERTICALS) def get_vertical_by_key(key: str) -> Optional[Dict[str, Any]]: """Return vertical by key.""" for v in ECOM_VERTICALS: if v.get("key") == key: return v return None def get_verticals_for_prompt(count: int = 5) -> str: """Return a comma-separated list of vertical names for use in prompts.""" chosen = random.sample(ECOM_VERTICALS, min(count, len(ECOM_VERTICALS))) return ", ".join(v["name"] for v in chosen) def get_angle_keys_for_vertical(vertical_key: str) -> List[str]: """Return list of angle keys suggested for this ecom vertical (for variety).""" v = get_vertical_by_key(vertical_key) if not v or "angle_hint" not in v: return [] return [k.strip() for k in v["angle_hint"].split(",")]