"""
Configuration for the personal arb scanner.
Fill in your own values before running.
"""

import os

# Load variables from a local .env file if present (copy .env.example to .env
# and fill in your values). Falls back silently to real environment
# variables / defaults if python-dotenv isn't installed or .env is missing -
# useful on cPanel where editing environment variables per-cron-job is fiddly.
try:
    from dotenv import load_dotenv
    load_dotenv()
except ImportError:
    pass

# --- Email alert settings (using Gmail SMTP as an example) ---
# Recommended: create a Gmail "App Password" rather than using your real password.
# https://myaccount.google.com/apppasswords
EMAIL_SENDER = os.environ.get("ARB_EMAIL_SENDER", "youraddress@gmail.com")
EMAIL_APP_PASSWORD = os.environ.get("ARB_EMAIL_APP_PASSWORD", "")  # set as env var, don't hardcode
EMAIL_RECIPIENT = os.environ.get("ARB_EMAIL_RECIPIENT", "youraddress@gmail.com")
SMTP_HOST = "smtp.gmail.com"
SMTP_PORT = 587

# --- Scan settings ---
POLL_INTERVAL_SECONDS = 45          # how often to re-check odds
MIN_PROFIT_MARGIN_PERCENT = 2.0     # ignore arbs below this margin (safety buffer for odds movement)
SPORTS_TO_TRACK = ["football"]      # extend later: "basketball", "tennis", etc.

# --- Bookmakers enabled ---
ENABLED_BOOKS = ["sportpesa", "betika"]

# --- Logging ---
LOG_FILE = "arb_scanner.log"
