{
  "Type": "Window",
  "Id": "server_console",
  "Title": "Admin Console",
  "Icon": "\u2699\ufe0f",
  "Classes": [
    "ps-window-holo"
  ],
  "State": "Maximized",
  "DisplayLocation": "Taskbar",
  "WindowGroup": "static_menu",
  "IsRestorable": false,
  "IsMinimizable": false,
  "RequiredRoles": [
    "ServerAdmin"
  ],
  "Children": [
    {
      "Type": "Grid",
      "Id": "server_console_layout",
      "Width": "100%",
      "Height": "100%",
      "ColumnDefinitions": [
        "1fr",
        "3fr"
      ],
      "RowDefinitions": [
        "auto",
        "1fr"
      ],
      "Gap": 16,
      "Children": [
        {
          "Type": "StackPanel",
          "Id": "left_panel",
          "Orientation": "Vertical",
          "Grid.Column": 0,
          "Grid.Row": 1,
          "Gap": 16,
          "Children": [
            {
              "Type": "Label",
              "Text": "Server Settings",
              "Style": "Label.Subheading"
            },
            {
              "Type": "StackPanel",
              "Orientation": "Vertical",
              "Gap": 8,
              "Padding": "12",
              "Classes": [
                "ps-panel--inner"
              ],
              "Children": [
                {
                  "Type": "Label",
                  "Text": "Server Name",
                  "Style": "Label.Small"
                },
                {
                  "Type": "Input",
                  "Id": "txt_server_name",
                  "Placeholder": "Enter server name",
                  "MaxLength": 64,
                  "InputType": "text"
                },
                {
                  "Type": "Label",
                  "Text": "Server Password",
                  "Style": "Label.Small"
                },
                {
                  "Type": "Input",
                  "Id": "txt_server_password",
                  "Placeholder": "Enter server password",
                  "MaxLength": 64,
                  "InputType": "password"
                },
                {
                  "Type": "Label",
                  "Text": "Max Players",
                  "Style": "Label.Small"
                },
                {
                  "Type": "Slider",
                  "Id": "slider_max_players",
                  "Min": 1,
                  "Max": 32,
                  "Step": 1,
                  "ShowValue": true,
                  "Value": 10
                },
                {
                  "Type": "Label",
                  "Text": "Allow Spectators",
                  "Style": "Label.Small"
                },
                {
                  "Type": "Checkbox",
                  "Id": "chk_allow_spectators",
                  "Checked": true
                },
                {
                  "Type": "Label",
                  "Text": "Shadow Spectators",
                  "Style": "Label.Small"
                },
                {
                  "Type": "Checkbox",
                  "Id": "chk_shadow_spectators",
                  "Checked": false
                },
                {
                  "Type": "Button",
                  "Id": "btn_save_settings",
                  "Text": "Save Settings",
                  "Style": "Primary",
                  "Command": "server.console.save_settings"
                }
              ]
            }
          ]
        },
        {
          "Type": "StackPanel",
          "Id": "right_panel",
          "Orientation": "Vertical",
          "Grid.Column": 1,
          "Grid.Row": 1,
          "Gap": 16,
          "Children": [
            {
              "Type": "Label",
              "Text": "Connected Players",
              "Style": "Label.Subheading"
            },
            {
              "Type": "DataGrid",
              "Id": "grid_players",
              "Width": "100%",
              "Height": "100%",
              "EnableVerticalScroll": true,
              "HeadersVisible": true,
              "UseZebraStriping": true,
              "Columns": [
                {
                  "Header": "Player",
                  "Field": "username",
                  "Flex": 2
                },
                {
                  "Header": "Status",
                  "Field": "status",
                  "Flex": 1,
                  "Align": "Center"
                },
                {
                  "Header": "Admin",
                  "Field": "isAdmin",
                  "Flex": 0.6,
                  "Align": "Center"
                },
                {
                  "Header": "Mod",
                  "Field": "isMod",
                  "Flex": 0.6,
                  "Align": "Center"
                },
                {
                  "Header": "Spec",
                  "Field": "isSpectator",
                  "Flex": 0.6,
                  "Align": "Center"
                },
                {
                  "Header": "Actions",
                  "Field": "actions",
                  "Flex": 1.5,
                  "Align": "Center"
                }
              ],
              "Rows": []
            },
            {
              "Type": "StackPanel",
              "Orientation": "Horizontal",
              "Gap": 8,
              "Padding": "12",
              "Classes": [
                "ps-panel--inner"
              ],
              "Children": [
                {
                  "Type": "Button",
                  "Id": "btn_commit_changes",
                  "Text": "Commit to Disk",
                  "Style": "Success",
                  "Command": "server.console.commit_to_disk"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "Background": "rgba(0,0,0,0.85)",
  "Padding": "16"
}
