#!/usr/local/bin/python
"""
Install Station executable module.

This is the main entry point for the Install Station GTK+ application.
It initializes all page components and sets up the main window interface.
"""
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

from install_station.language import Language
from install_station.keyboard import Keyboard
from install_station.network_setup import NetworkSetup
from install_station.try_install import TryOrInstall
from install_station.install_type import InstallTypes
from install_station.custom import PartitionManager
from install_station.use_zfs import ZFS
from install_station.boot_manager import BootManager
from install_station.data import logo
from install_station.window import Window
from install_station.interface_controller import Interface, Button


class MainWindow:
    """
    Install Station main window class.
    
    This class initializes the main GTK window and sets up all page components
    for the installation wizard interface.
    """

    def __init__(self) -> None:
        """
        Initialize the Install Station main window.
        
        Sets up page assignments to Interface class, configures the main window
        properties, and creates the main interface layout.
        """
        Interface.welcome = Language
        Interface.keyboard = Keyboard
        Interface.network_setup = NetworkSetup
        Interface.try_install = TryOrInstall
        Interface.installation_type = InstallTypes
        Interface.custom_partition = PartitionManager
        Interface.full_zfs = ZFS
        Interface.boot_manager = BootManager
        Window.connect("delete_event", Interface.delete)
        Window.set_border_width(0)
        Window.set_default_size(800, 500)
        Window.set_size_request(800, 500)
        Window.set_title("Install GhostBSD")
        Window.set_border_width(0)
        Window.set_icon_from_file(logo)
        main_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, homogeneous=False, spacing=0)
        main_box.show()
        Window.add(main_box)
        main_box.pack_start(Interface.get_interface(), True, True, 0)
        Window.show_all()
        Button.show_initial()


MainWindow()
Gtk.main()
