"""Zentrale Konfiguration"""
import os
from pathlib import Path

# Basis-Pfade
BASE_DIR = Path(__file__).parent.parent.parent
DATA_DIR = BASE_DIR / "data"
CONFIG_DIR = BASE_DIR / "config"
REGELN_DIR = BASE_DIR / "regeln"

# Datenbank
DATABASE_URL = os.getenv("DATABASE_URL", f"sqlite:///{DATA_DIR}/dateiverwaltung.db")

# Ordner-Struktur
INBOX_DIR = DATA_DIR / "inbox"
PROCESSED_DIR = DATA_DIR / "processed"
ARCHIVE_DIR = DATA_DIR / "archive"
ZUGFERD_DIR = DATA_DIR / "zugferd"

# OCR Einstellungen
OCR_LANGUAGE = "deu"  # Deutsch
OCR_DPI = 300

# Erstelle Ordner falls nicht vorhanden
for dir_path in [INBOX_DIR, PROCESSED_DIR, ARCHIVE_DIR, ZUGFERD_DIR, REGELN_DIR]:
    dir_path.mkdir(parents=True, exist_ok=True)
