from textual.screen import ModalScreen
from textual.containers import HorizontalGroup, Vertical
from textual.app import ComposeResult
from textual.widgets import Static
from textual.binding import Binding


class LicenseScreen(ModalScreen):
    DEFAULT_CSS = """
    LicenseScreen {
        align: center middle;
        
        #center {
            width: 65;
            height: 12;
            border: panel $primary;
            
            align: center top;
            padding: 1 2;
            
            Static {
                text-align: center;
            }
        }
        
        
    }
    """
    
    BINDINGS = [
        Binding("escape", "dismiss", "Cancel", tooltip="Close")
    ]
    
    def compose(self) -> ComposeResult:
        with Vertical(id="center") as center:
            center.border_title = "License"
            yield Static("[b]=== Copyright © 2026 ===[/b]\n\nTerminal-DAW is licensed under the GPL-3.0 License and will always be hosted on https://chookspace.com under the account SpookyDervish.\n\n[d]I hope you enjoy what I've made even if it isn't perfect. :P - SpookyDervish[/d]")