from PySide6.QtWidgets import QMainWindow, QApplication, QWidget, QVBoxLayout, QLabel, QPushButton, QLineEdit, QMenu, QHBoxLayout
from PySide6.QtCore import Qt, Signal
from factum import config
import factum.ui.stylesheet as ss

class FactumWindow(QMainWindow):
    def __init__(self, db_service):
        super().__init__()
        self.db_service = db_service
        self.config = config.settings
        self.create_ui()
        self.connect_ui_elements()
        
    def create_ui(self):
        self.setWindowTitle("Factum")
        self.setGeometry(100, 100, 800, 600)
        self.setStyleSheet(ss.main_window_style)
        
        central_widget = QWidget()
        self.setCentralWidget(central_widget)
        
        self.main_layout = QHBoxLayout()
        self.case_tree_layout = QVBoxLayout()
        self.note_area_layout = QVBoxLayout()
        self.info_widget_layout = QVBoxLayout()

        self.main_layout.addLayout(self.case_tree_layout)
        self.main_layout.addLayout(self.note_area_layout)
        self.main_layout.addLayout(self.info_widget_layout)

        central_widget.setLayout(self.main_layout)

        self.create_menu_bar()
    def connect_ui_elements(self):
        pass
    
    def create_menu_bar(self):
        menu_bar = self.menuBar()
        menu_bar.setStyleSheet(ss.toolbar_style)
        
        settings_menu = QMenu("&Settings", self)
        menu_bar.addMenu(settings_menu)
        
        about_menu = QMenu("&About", self)
        menu_bar.addMenu(about_menu)