import os
import sys

import dotenv
from PyQt6.QtWidgets import QApplication
from state import State

if __name__ == "__main__":
    dotenv.load_dotenv()
    url = os.environ.get("DRIVE_HOST_URL")
    if not url:
        url = "localhost:3000"
    else:
        url = url.strip()
    app = QApplication(sys.argv)
    window = State(url)
    window.show()
    sys.exit(app.exec())
