#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""NVR Net Diag — punto de entrada portable."""
from __future__ import annotations

import sys
from pathlib import Path

# permitir ejecución desde fuente: python main.py
ROOT = Path(__file__).resolve().parent
if str(ROOT) not in sys.path:
    sys.path.insert(0, str(ROOT))

from app.models import ensure_dirs  # noqa: E402


def main() -> int:
    ensure_dirs()
    from app.gui import run_app

    run_app()
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
