{
  "Type": "Window",
  "Id": "turret_designer",
  "Title": "Turret Design",
  "Icon": "\ud83c\udfaf",
  "Classes": [
    "ps-window-holo"
  ],
  "State": "Maximized",
  "DisplayLocation": "Taskbar",
  "WindowGroup": "static_menu",
  "IsRestorable": false,
  "IsMinimizable": false,
  "Width": "100%",
  "Height": "100%",
  "Background": "rgba(0,0,0,0.85)",
  "BackgroundImage": "UI/Backgrounds/turret_designer.jpg",
  "Padding": "16",
  "Children": [
    {
      "Type": "Grid",
      "Id": "turret_designer_layout",
      "Width": "100%",
      "Height": "100%",
      "HorizontalAlignment": "Stretch",
      "VerticalAlignment": "Stretch",
      "ColumnDefinitions": [
        "1fr",
        "1fr"
      ],
      "RowDefinitions": [
        "auto",
        "auto",
        "auto",
        "auto",
        "1fr",
        "auto"
      ],
      "Children": [
        {
          "Type": "Select",
          "Id": "turret_race_select",
          "Grid.Column": 0,
          "Grid.Row": 0,
          "Width": "100%",
          "Margin": "0 0 12px 0",
          "Value": "",
          "Options": [],
          "Placeholder": "Select race",
          "Command": "core.turret.select_race"
        },
        {
          "Type": "Label",
          "Id": "turret_tech_info",
          "Grid.Column": 1,
          "Grid.Row": 0,
          "Margin": "0 0 12px 0",
          "VerticalAlignment": "Center",
          "Text": "Turret Tracking Speed (10% Gear): \u2014 km/s",
          "Classes": [
            "ps-text-secondary"
          ]
        },
        {
          "Type": "Select",
          "Id": "turret_weapon_select",
          "Grid.Column": 0,
          "Grid.Row": 1,
          "Width": "100%",
          "Classes": [
            "ps-select-shell--full"
          ],
          "Value": "",
          "Options": [],
          "Placeholder": "Select base weapon",
          "Command": "core.turret.select_weapon"
        },
        {
          "Type": "Label",
          "Id": "turret_fire_control_info",
          "Grid.Column": 1,
          "Grid.Row": 1,
          "VerticalAlignment": "Center",
          "Text": "Fire Control Speed Rating: \u2014 km/s",
          "Classes": [
            "ps-text-secondary"
          ]
        },
        {
          "Type": "RadioGroup",
          "Id": "turret_count_group",
          "Grid.Column": 0,
          "Grid.Row": 2,
          "Orientation": "Horizontal",
          "Gap": 12,
          "Margin": "8px 0 8px 0",
          "SelectedValue": "1",
          "Command": "core.turret.set_weapon_count",
          "Items": [
            {
              "Label": "Single",
              "Value": "1"
            },
            {
              "Label": "Twin",
              "Value": "2"
            },
            {
              "Label": "Triple",
              "Value": "3"
            },
            {
              "Label": "Quad",
              "Value": "4"
            }
          ]
        },
        {
          "Type": "StackPanel",
          "Grid.Column": 0,
          "Grid.Row": 3,
          "Orientation": "Vertical",
          "Gap": 6,
          "Margin": "0 8px 0 0",
          "Children": [
            {
              "Type": "DataGrid",
              "Id": "turret_parameter_grid",
              "Width": "100%",
              "HeadersVisible": false,
              "Compact": true,
              "EnableVerticalScroll": false,
              "AllowSorting": false,
              "AllowReorder": false,
              "SelectionMode": "None",
              "OnCellEdited": "core.turret.grid_edit",
              "Columns": [
                {
                  "Header": "Parameter",
                  "Field": "label",
                  "Width": "2fr"
                },
                {
                  "Header": "Value",
                  "Field": "value",
                  "Width": "1fr",
                  "Align": "Right",
                  "Editable": true,
                  "EditorType": "Number",
                  "EditCommand": "core.turret.grid_edit"
                }
              ],
              "Rows": []
            }
          ]
        },
        {
          "Type": "StackPanel",
          "Grid.Column": 1,
          "Grid.Row": 3,
          "Orientation": "Vertical",
          "Gap": 6,
          "Children": [
            {
              "Type": "Input",
              "Id": "turret_company_name_input",
              "Width": "100%",
              "Placeholder": "Company Name",
              "Command": "core.turret.set_company_name"
            },
            {
              "Type": "Input",
              "Id": "turret_design_name_input",
              "Width": "100%",
              "Placeholder": "Design Name",
              "Command": "core.turret.set_design_name"
            }
          ]
        },
        {
          "Type": "ScrollBox",
          "Id": "turret_left_panel",
          "Grid.Column": 0,
          "Grid.Row": 4,
          "Axis": "Vertical",
          "Width": "100%",
          "Height": "100%",
          "Padding": "4",
          "Background": "transparent",
          "Children": [
            {
              "Type": "PropertyGrid",
              "Id": "turret_calc_grid",
              "Classes": [
                "ps-pgrid--compact"
              ],
              "Sections": []
            }
          ]
        },
        {
          "Type": "ScrollBox",
          "Id": "turret_right_panel",
          "Grid.Column": 1,
          "Grid.Row": 4,
          "Axis": "Vertical",
          "Width": "100%",
          "Height": "100%",
          "Padding": "4",
          "Background": "transparent",
          "Children": [
            {
              "Type": "Panel",
              "Id": "turret_specs_panel",
              "Width": "100%",
              "Classes": [
                "ps-panel",
                "ps-panel--glass"
              ],
              "Children": [
                {
                  "Type": "StackPanel",
                  "Id": "turret_specs_content",
                  "Orientation": "Vertical",
                  "Gap": 6,
                  "Width": "100%",
                  "Children": [
                    {
                      "Type": "Label",
                      "Id": "turret_specs_heading",
                      "Text": "Design Summary"
                    },
                    {
                      "Type": "Label",
                      "Id": "turret_specs_text",
                      "Text": "Select a base weapon to begin turret design.",
                      "Width": "100%",
                      "Classes": [
                        "designer-specs"
                      ]
                    },
                    {
                      "Type": "Label",
                      "Id": "turret_status_text",
                      "Text": "",
                      "Width": "100%",
                      "Classes": [
                        "ps-text-secondary"
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "Type": "StackPanel",
          "Grid.Column": 0,
          "Grid.Row": 5,
          "Orientation": "Horizontal",
          "HorizontalAlignment": "Left",
          "VerticalAlignment": "Center",
          "Gap": 8,
          "Margin": "10 0 0 0",
          "Children": [
            {
              "Type": "Button",
              "Id": "turret_create_button",
              "Text": "Create",
              "Style": "Primary",
              "Command": "core.turret.create",
              "Width": "120px"
            },
            {
              "Type": "Button",
              "Id": "turret_prototype_button",
              "Text": "Prototype",
              "Command": "core.turret.prototype",
              "Width": "120px"
            },
            {
              "Type": "Button",
              "Id": "turret_instant_button",
              "Text": "Instant",
              "Style": "SpaceMaster",
              "Command": "core.turret.instant",
              "Width": "120px"
            },
            {
              "Type": "Button",
              "Id": "turret_company_button",
              "Text": "Company Name",
              "Command": "core.turret.company_name",
              "Width": "140px"
            }
          ]
        },
        {
          "Type": "Checkbox",
          "Id": "turret_show_obsolete",
          "Grid.Column": 1,
          "Grid.Row": 5,
          "HorizontalAlignment": "Right",
          "VerticalAlignment": "Center",
          "Label": "Show Obsolete",
          "Command": "core.turret.toggle_show_obsolete"
        }
      ]
    }
  ]
}
