"""
Placeholder data for seeding the database.
This data matches the structure from the frontend placeholder-data.ts
"""

# Mock users data
mockUsers = [
    {"id": "super-admin-user", "email": "admin@roadfy.com", "role": "super-admin"},
    {"id": "multillantas-johnny-admin", "email": "johnny@roadfy.app", "role": "business-admin", "businessId": "biz-1"},
    {"id": "serviruedas-admin", "email": "serviruedas@gmail.com", "role": "business-admin", "businessId": "biz-2"},
    {"id": "pimentel-admin", "email": "pimentel@roadfy.app", "role": "business-admin", "businessId": "biz-3"},
    {"id": "llantas-import-admin", "email": "plazanorte@roadfy.app", "role": "business-admin", "businessId": "biz-5"},
    {"id": "customer-user", "email": "customer@example.com", "role": "customer"},
]

# Mapeo de imágenes por marca y modelo de llanta
# Clave: "Marca|Modelo" (case-insensitive)
TireImagesByBrandModel = {
    # Goodyear
    "Goodyear|Eagle Sport": "https://i.imgur.com/N18vIYk.png",
    "Goodyear|Eagle Sport 2": "https://i.imgur.com/N18vIYk.png",
    "Goodyear|Assurance WeatherReady": "https://i.imgur.com/N18vIYk.png",
    "Goodyear|Cargo Marathon 2": "https://i.imgur.com/N18vIYk.png",
    "Goodyear|Eagle F1 Asymmetric 6": "https://i.imgur.com/ZOu9Slb.png",
    "Goodyear|G28": "https://i.imgur.com/N18vIYk.png",
    "Goodyear|Assurance Maxlife": "https://i.imgur.com/N18vIYk.png",
    
    # Michelin
    "Michelin|Defender LTX M/S": "https://i.imgur.com/NfScKO2.png",
    "Michelin|Pilot Sport 4S": "https://i.imgur.com/ZOu9Slb.png",
    "Michelin|Latitude Cross": "https://i.imgur.com/iU3m8v7.png",
    
    # Bridgestone
    "Bridgestone|Alenza AS Ultra": "https://i.imgur.com/N18vIYk.png",
    "Bridgestone|Dueler H/T 684 II": "https://i.imgur.com/oAPe43X.png",
    
    # Pirelli
    "Pirelli|P Zero": "https://i.imgur.com/ZOu9Slb.png",
    "Pirelli|Scorpion All Terrain Plus": "https://i.imgur.com/pAEbiBh.png",
    
    # Hankook
    "Hankook|Ventus V12 evo2": "https://i.imgur.com/ZOu9Slb.png",
    
    # Maxxis
    "Maxxis|Razr MT": "https://images.unsplash.com/photo-1624413155375-399b8d03957b?q=80&w=400&h=400&fit=crop",
    
    # Continental
    "Continental|CrossContact LX25": "https://i.imgur.com/pAEbiBh.png",
    
    # Kumho
    "Kumho|Crugen HT51": "https://i.imgur.com/N18vIYk.png",
    
    # Firestone
    "Firestone|Destination A/T2": "https://i.imgur.com/fiuWW4A.png",
    
    # Dunlop
    "Dunlop|Grandtrek AT20": "https://i.imgur.com/pAEbiBh.png",
    "Dunlop|Direzza DZ102": "https://i.imgur.com/WbGziKF.png",
    
    # Habilead
    "Habilead|RS01 Taxi": "https://i.imgur.com/g8n23vY.png",
    "Habilead|H202": "https://i.imgur.com/g8n23vY.png",
    "Habilead|RS23 A/T": "https://i.imgur.com/g8n23vY.png",
    
    # Kapsen
    "Kapsen|Sport Max S2000": "https://i.imgur.com/g8n23vY.png",
    "Kapsen|Practical Max RS21": "https://i.imgur.com/g8n23vY.png",
    "Kapsen|Practical Max RS25 M/T": "https://i.imgur.com/g8n23vY.png",
    
    # Triangle
    "Triangle|TR968": "https://i.imgur.com/g8n23vY.png",
    
    # Doupro
    "Doupro|ST986 Traccion/Minera": "https://i.imgur.com/g8n23vY.png",
    
    # Blackhawk
    "Blackhawk|HA01 AT": "https://i.imgur.com/pAEbiBh.png",
}

# Función helper para obtener imagen por marca y modelo
def get_tire_image(brand: str, model: str) -> str:
    """
    Obtiene la URL de imagen para una llanta basada en su marca y modelo.
    Retorna una imagen por defecto si no se encuentra.
    """
    key = f"{brand}|{model}"
    # Buscar exacto primero
    if key in TireImagesByBrandModel:
        return TireImagesByBrandModel[key]
    
    # Buscar case-insensitive
    key_lower = key.lower()
    for k, v in TireImagesByBrandModel.items():
        if k.lower() == key_lower:
            return v
    
    # Si no se encuentra, retornar imagen por defecto
    return 'https://placehold.co/400x400/27272a/e5e5e5/png?text=No+Image'

# All tires data
allTires = [
    {"id": "tire-1", "brand": "Goodyear", "model": "Eagle Sport", "size": {"width": 205, "aspectRatio": 55, "diameter": 16}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-2", "brand": "Michelin", "model": "Defender LTX M/S", "size": {"width": 215, "aspectRatio": 60, "diameter": 17}, "type": "Uso Mixto (A/T)"},
    {"id": "tire-3", "brand": "Bridgestone", "model": "Alenza AS Ultra", "size": {"width": 225, "aspectRatio": 50, "diameter": 18}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-4", "brand": "Pirelli", "model": "P Zero", "size": {"width": 245, "aspectRatio": 40, "diameter": 19}, "type": "Deportiva (UHP)"},
    {"id": "tire-5", "brand": "Goodyear", "model": "Assurance WeatherReady", "size": {"width": 195, "aspectRatio": 65, "diameter": 15}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-6", "brand": "Hankook", "model": "Ventus V12 evo2", "size": {"width": 235, "aspectRatio": 45, "diameter": 18}, "type": "Deportiva (UHP)"},
    {"id": "tire-7", "brand": "Maxxis", "model": "Razr MT", "size": {"width": 265, "aspectRatio": 70, "diameter": 17}, "type": "Todo Terreno (M/T)"},
    {"id": "tire-8", "brand": "Continental", "model": "CrossContact LX25", "size": {"width": 225, "aspectRatio": 65, "diameter": 17}, "type": "Uso Mixto (A/T)"},
    {"id": "tire-9", "brand": "Kumho", "model": "Crugen HT51", "size": {"width": 265, "aspectRatio": 65, "diameter": 18}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-10", "brand": "Firestone", "model": "Destination A/T2", "size": {"width": 245, "aspectRatio": 75, "diameter": 16}, "type": "Uso Mixto (A/T)"},
    {"id": "tire-11", "brand": "Dunlop", "model": "Grandtrek AT20", "size": {"width": 265, "aspectRatio": 60, "diameter": 18}, "type": "Uso Mixto (A/T)"},
    {"id": "tire-12", "brand": "Pirelli", "model": "Scorpion All Terrain Plus", "size": {"width": 275, "aspectRatio": 55, "diameter": 20}, "type": "Uso Mixto (A/T)"},
    {"id": "tire-13", "brand": "Michelin", "model": "Pilot Sport 4S", "size": {"width": 255, "aspectRatio": 35, "diameter": 19}, "type": "Deportiva (UHP)"},
    {"id": "tire-14", "brand": "Habilead", "model": "RS01 Taxi", "size": {"width": 185, "aspectRatio": 70, "diameter": 13}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-15", "brand": "Habilead", "model": "H202", "size": {"width": 195, "aspectRatio": 65, "diameter": 15}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-16", "brand": "Kapsen", "model": "Sport Max S2000", "size": {"width": 215, "aspectRatio": 45, "diameter": 17}, "type": "Deportiva (UHP)"},
    {"id": "tire-17", "brand": "Kapsen", "model": "Practical Max RS21", "size": {"width": 225, "aspectRatio": 65, "diameter": 17}, "type": "Uso Mixto (A/T)"},
    {"id": "tire-18", "brand": "Habilead", "model": "RS23 A/T", "size": {"width": 265, "aspectRatio": 60, "diameter": 18}, "type": "Uso Mixto (A/T)"},
    {"id": "tire-19", "brand": "Kapsen", "model": "Practical Max RS25 M/T", "size": {"width": 235, "aspectRatio": 85, "diameter": 16}, "type": "Todo Terreno (M/T)"},
    {"id": "tire-20", "brand": "Triangle", "model": "TR968", "size": {"width": 225, "aspectRatio": 45, "diameter": 17}, "type": "Deportiva (UHP)"},
    {"id": "tire-21", "brand": "Bridgestone", "model": "Dueler H/T 684 II", "size": {"width": 195, "aspectRatio": 80, "diameter": 15}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-22", "brand": "Dunlop", "model": "Direzza DZ102", "size": {"width": 195, "aspectRatio": 50, "diameter": 15}, "type": "Deportiva (UHP)"},
    {"id": "tire-23", "brand": "Dunlop", "model": "Direzza DZ102", "size": {"width": 205, "aspectRatio": 55, "diameter": 15}, "type": "Deportiva (UHP)"},
    {"id": "tire-24", "brand": "Doupro", "model": "ST986 Traccion/Minera", "size": {"width": 12, "aspectRatio": 0, "diameter": 20}, "type": "Todo Terreno (M/T)"},
    {"id": "tire-25", "brand": "Michelin", "model": "Latitude Cross", "size": {"width": 235, "aspectRatio": 75, "diameter": 15}, "type": "Uso Mixto (A/T)"},
    {"id": "tire-26", "brand": "Goodyear", "model": "Eagle Sport 2", "size": {"width": 185, "aspectRatio": 60, "diameter": 15}, "type": "Deportiva (UHP)"},
    {"id": "tire-27", "brand": "Goodyear", "model": "Cargo Marathon 2", "size": {"width": 195, "aspectRatio": 70, "diameter": 15}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-28", "brand": "Goodyear", "model": "Eagle F1 Asymmetric 6", "size": {"width": 215, "aspectRatio": 45, "diameter": 18}, "type": "Deportiva (UHP)"},
    {"id": "tire-29", "brand": "Goodyear", "model": "G28", "size": {"width": 155, "aspectRatio": 0, "diameter": 12}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-30", "brand": "Goodyear", "model": "Assurance Maxlife", "size": {"width": 165, "aspectRatio": 60, "diameter": 14}, "type": "Pista / Carretera (H/T)"},
    {"id": "tire-31", "brand": "Blackhawk", "model": "HA01 AT", "size": {"width": 235, "aspectRatio": 65, "diameter": 17}, "type": "Uso Mixto (A/T)"},
]

# All businesses data
allBusinesses = [
    {
        "id": "biz-1",
        "name": "Multillantas Johnny",
        "address": "Av. Centenario 1369, Huaraz",
        "contact": {"phone": "943627557", "email": "johnny@roadfy.app"},
        "hours": "L-S 8:00 AM - 6:00 PM",
        "rating": 4.7,
        "reviewCount": 92,
        "description": "Especialistas en llantas Kapsen y Habilead. Ofrecemos los mejores precios y servicio de enllante y balanceo computarizado para todo tipo de vehículo.",
        "googleMapsEmbedUrl": "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d62959.69722708384!2d-77.60441907832029!3d-9.5103732!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x91a90d6f473f41c7%3A0x43b7466a94040b18!2sMULTILLANTAS%20JOHNNY!5e0!3m2!1ses!2spe!4v1764184645172!5m2!1ses!2spe",
        "imageUrl": "https://i.imgur.com/ETbYoEk.jpeg",
        "socials": {"facebook": "https://www.facebook.com/share/1EMuuUWjkA/", "whatsapp": "https://wa.me/51943627557"}
    },
    {
        "id": "biz-2",
        "name": "Serviruedas",
        "address": "Av. Centenario N°1452, Huaraz",
        "contact": {"phone": "943627730", "email": "serviruedas@gmail.com"},
        "hours": "L-V 9:00 AM - 7:00 PM, S 9:00 AM - 2:00 PM",
        "rating": 4.8,
        "reviewCount": 120,
        "description": "Distribuidor autorizado de las mejores marcas. Ofrecemos instalación gratuita por la compra de 4 llantas. Asesoramiento personalizado.",
        "googleMapsEmbedUrl": "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3934.9880741776647!2d-77.5322944!3d-9.509765!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x91a90dadcecc9833%3A0x1aa3d95a5fc35c40!2sLLANTAS%20SERVIRUEDAS%20HUARAZ!5e0!3m2!1ses!2spe!4v1764184579304!5m2!1ses!2spe",
        "imageUrl": "https://i.imgur.com/fcHG2LI.jpeg",
        "socials": {"facebook": "https://www.facebook.com/share/1A2A7SyHx1/", "whatsapp": "https://wa.me/51943627730"}
    },
    {
        "id": "biz-3",
        "name": "Pimentel - Llantas y servicios",
        "address": "Av. Centenario cuadra 30 S/N Vichay",
        "contact": {"phone": "940271489", "email": "pimentel@roadfy.app"},
        "hours": "L-S 8:30 AM - 6:30 PM",
        "rating": 4.3,
        "reviewCount": 78,
        "description": "Venta de llantas, aros, baterías y más. Contamos con equipos de última generación y los mejores profesionales a su servicio.",
        "googleMapsEmbedUrl": "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2014741.3788542578!2d-78.88296814540479!3d-9.50509789452329!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x91a913d98a414423%3A0xcc056efc1c749ede!2sAlfredo%20Pimentel%20Sevilla%20Huaraz!5e0!3m2!1ses!2spe!4v1764184675910!5m2!1ses!2spe",
        "imageUrl": "https://i.imgur.com/ST4EiQR.jpeg",
        "socials": {"facebook": "https://www.facebook.com/share/1GPPiGQiSU/", "whatsapp": "https://wa.me/51940271489"}
    },
    {
        "id": "biz-5",
        "name": "Llantas Import Plaza Norte",
        "address": "Av. Centenario s/n, Independencia, Huaraz",
        "contact": {"phone": "936020551", "email": "plazanorte@roadfy.app"},
        "hours": "L-S 9:00 AM - 6:00 PM",
        "rating": 4.6,
        "reviewCount": 45,
        "description": "Importadores directos de las mejores marcas. Calidad y garantía a tu alcance.",
        "googleMapsEmbedUrl": "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3934.9986961168893!2d-77.53492392553714!3d-9.50884169985126!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x91a90d9f4d772e6b%3A0xb94fb573fabcbc66!2sLlantas%20Import%20Plaza%20Norte!5e0!3m2!1ses!2spe!4v1764184702812!5m2!1ses!2spe",
        "imageUrl": "https://i.imgur.com/gsJZey2.jpeg",
        "socials": {"facebook": "https://www.facebook.com/share/19pP7QGSDX/", "whatsapp": "https://wa.me/51936020551"}
    },
]

# Inventory data
inventory = [
    # Multillantas Johnny (biz-1) Inventory
    {"businessId": "biz-1", "tireId": "tire-14", "quantity": 25, "price": 180.00},
    {"businessId": "biz-1", "tireId": "tire-15", "quantity": 30, "price": 210.00},
    {"businessId": "biz-1", "tireId": "tire-16", "quantity": 15, "price": 350.00},
    {"businessId": "biz-1", "tireId": "tire-17", "quantity": 20, "price": 420.00},
    {"businessId": "biz-1", "tireId": "tire-18", "quantity": 18, "price": 580.00},
    {"businessId": "biz-1", "tireId": "tire-19", "quantity": 10, "price": 650.00},
    # Serviruedas (biz-2) Inventory
    {"businessId": "biz-2", "tireId": "tire-20", "quantity": 15, "price": 380.00},
    {"businessId": "biz-2", "tireId": "tire-21", "quantity": 20, "price": 450.00},
    {"businessId": "biz-2", "tireId": "tire-22", "quantity": 12, "price": 290.00},
    {"businessId": "biz-2", "tireId": "tire-23", "quantity": 12, "price": 310.00},
    {"businessId": "biz-2", "tireId": "tire-24", "quantity": 8, "price": 1200.00},
    {"businessId": "biz-2", "tireId": "tire-25", "quantity": 14, "price": 550.00},
    # Pimentel - Llantas y servicios (biz-3) Inventory
    {"businessId": "biz-3", "tireId": "tire-26", "quantity": 18, "price": 320.00},
    {"businessId": "biz-3", "tireId": "tire-27", "quantity": 15, "price": 410.00},
    {"businessId": "biz-3", "tireId": "tire-28", "quantity": 10, "price": 750.00},
    {"businessId": "biz-3", "tireId": "tire-29", "quantity": 30, "price": 190.00},
    {"businessId": "biz-3", "tireId": "tire-30", "quantity": 22, "price": 250.00},
    {"businessId": "biz-3", "tireId": "tire-31", "quantity": 12, "price": 620.00},
    # Llantas Import Plaza Norte (biz-5) Inventory
    {"businessId": "biz-5", "tireId": "tire-2", "quantity": 10, "price": 490.00},
    {"businessId": "biz-5", "tireId": "tire-13", "quantity": 5, "price": 940.00},
    {"businessId": "biz-5", "tireId": "tire-3", "quantity": 15, "price": 570.00},
    {"businessId": "biz-5", "tireId": "tire-21", "quantity": 18, "price": 440.00},
    {"businessId": "biz-5", "tireId": "tire-1", "quantity": 25, "price": 350.00},
    {"businessId": "biz-5", "tireId": "tire-26", "quantity": 15, "price": 315.00},
    {"businessId": "biz-5", "tireId": "tire-11", "quantity": 10, "price": 620.00},
    {"businessId": "biz-5", "tireId": "tire-22", "quantity": 20, "price": 285.00},
    {"businessId": "biz-5", "tireId": "tire-9", "quantity": 14, "price": 460.00},
]

