# config.py (complete updated version)
import os
from dataclasses import dataclass
from typing import List


@dataclass
class Config:
    # Database settings
    DATABASE_PATH = "data/motions.db"

    # API settings (updated)
    TWEEDE_KAMER_ODATA_API = "https://gegevensmagazijn.tweedekamer.nl/OData/v4/2.0"
    API_TIMEOUT = 30
    API_BATCH_SIZE = 250  # Increased based on API capabilities
    API_MAX_LIMIT = 250

    # AI settings
    OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY")
    OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1"
    QWEN_MODEL = "qwen/qwen-2.5-72b-instruct"

    # App settings
    DEFAULT_MOTION_COUNT = 10
    DEFAULT_WINNING_MARGIN_MIN = (
        0  # % - include all, filter by layman_explanation instead
    )
    DEFAULT_WINNING_MARGIN_MAX = 100  # %
    SESSION_TIMEOUT_DAYS = 30

    # Policy areas
    POLICY_AREAS = [
        "Alle",
        "Economie",
        "Klimaat",
        "Immigratie",
        "Zorg",
        "Onderwijs",
        "Defensie",
        "Sociale Zaken",
        "Algemeen",
    ]

    # Scraper defaults (previously missing)
    BASE_URL = (
        "https://www.tweedekamer.nl/zoeken/zoekresultaten"  # base for scraping motions
    )
    SCRAPING_DELAY = int(os.getenv("SCRAPING_DELAY", "5"))


config = Config()
