import { AboutSlint, VerticalBox, StandardButton } from "std-widgets.slint";
import { TabBar, TabContainer } from "@root/widgets/tab.slint";

component Obliteration {
    VerticalBox {
        Image {
            source: @image-url("@root/assets/logo.png");
        }

        Text {
            text: "Obliteration is a free and open-source software to run PlayStation 4 system software on PC.";
            wrap: word-wrap;
        }
    }
}

component Slint {
    AboutSlint { }
}

export component AboutWindow inherits Dialog {
    title: "About";
    width: 500px;
    height: 245px;

    TabContainer {
        tab := TabBar {
            tabs: [
                { text: "Obliteration", icon: @image-url("@root/assets/icon.png") },
                {
                    text: "Slint",
                    icon: @image-url("@root/assets/slint-logo-small-dark.svg"),
                    colorize-icon: true
                }
            ];
        }

        if tab.current-page == 0: Obliteration { }

        if tab.current-page == 1: Slint { }
    }

    StandardButton {
        kind: close;
    }
}
