import { ActionFormData } from '@minecraft/server-ui';

import { showMainMenuForm } from './mainMenuForm';


export async function showChangelogForm(player){
    let form = new ActionFormData();
    form.title("Colorful Glass - Changelog");

    let formBody = {rawtext: [
        {text: "\n§lDate: §r§727th July 2024\n"},
        {text: "§f§lVersion: §r§7v1.0.0\n"},
        {text: "§f§lChanges: §r§7Initial Release\n"},
        {text: "§f§7--------------------§r\n"}
    ] }

    form.body(formBody);
    form.button("Back", "textures/blocks/barrier");

    const result = await form.show(player)
    const selection = result.selection;

    if(selection === 0){
        showMainMenuForm(player)
    }
}