{
	"Type": "Window",
	"Id": "load_game_browser",
	"Title": "Load Game",
	"Icon": "📂",
	"Width": "900px",
	"Height": "600px",
	"State": "Normal",
	"IsMinimizable": false,
	"Children": [
		{
			"Type": "Grid",
			"Id": "load_game_browser",
			"Width": "100%",
			"Height": "100%",
			"HorizontalAlignment": "Stretch",
			"VerticalAlignment": "Stretch",
			"Classes": ["ps-save-browser"],
			"Children": [
				{
					"Type": "Grid",
					"Id": "load_browser_grid",
					"Width": "100%",
					"Height": "100%",
					"HorizontalAlignment": "Stretch",
					"VerticalAlignment": "Stretch",
					"Padding": "16px",
					"Children": [
						{
							"Type": "DataGrid",
							"Id": "save_grid",
							"SelectionMode": "Single",
							"AllowSorting": true,
							"OnSelectionChanged": "client.persistence.select_load_slot",
							"Columns": [
								{
									"Header": "Save Name",
									"Field": "saveName",
									"Flex": 3
								},
								{
									"Header": "Date",
									"Field": "timestampLocal",
									"Flex": 2
								},
								{
									"Header": "Mods",
									"Field": "modCount",
									"Flex": 1,
									"Align": "Right"
								},
								{
									"Header": "Status",
									"Field": "compatBadge",
									"Flex": 1,
									"Align": "Center"
								}
							],
							"Rows": [],
							"Height": "100%"
						}
					]
				},
				{
					"Type": "Modal",
					"Id": "load_rename_modal",
					"Title": "Rename Save",
					"IsVisible": false,
					"CloseOnEscape": true,
					"CloseOnBackdropClick": false,
					"CloseCommand": "client.persistence.close_rename",
					"Width": "480px",
					"Height": "160px",
					"Children": [
						{
							"Type": "StackPanel",
							"Id": "rename_save_input_row",
							"Orientation": "Horizontal",
							"Gap": 8,
							"Children": [
								{
									"Type": "Label",
									"Id": "lbl_rename_save_prompt",
									"Text": "Name:",
									"VerticalAlignment": "Center"
								},
								{
									"Type": "Input",
									"Id": "input_rename_save",
									"Value": "",
									"Width": "400px",
									"AutoFocus": true,
									"ShowClearButton": true,
									"CommitOnInput": true,
									"Command": "client.persistence.set_rename_input"
								}
							]
						}
					],
					"FooterChildren": [
						{
							"Type": "StackPanel",
							"Id": "rename_save_footer",
							"Orientation": "Horizontal",
							"Gap": 8,
							"HorizontalAlignment": "Right",
							"Children": [
								{
									"Type": "Button",
									"Id": "btn_rename_save_cancel",
									"Text": "Cancel",
									"Command": "client.persistence.close_rename"
								},
								{
									"Type": "Button",
									"Id": "btn_rename_save_confirm",
									"Text": "Rename",
									"Style": "Primary",
									"IsEnabled": false,
									"Command": "client.persistence.confirm_rename"
								}
							]
						}
					]
				},
				{
					"Type": "Modal",
					"Id": "load_delete_confirm_modal",
					"Title": "Delete Save",
					"IsVisible": false,
					"CloseOnEscape": true,
					"CloseOnBackdropClick": false,
					"CloseCommand": "client.persistence.close_delete_confirm",
					"Width": "480px",
					"Height": "220px",
					"BadgeText": "Danger",
					"BadgeVariant": "danger",
					"AccentVariant": "danger",
					"DisplayMode": "Pulse",
					"Children": [
						{
							"Type": "Label",
							"Id": "lbl_load_delete_confirm",
							"Text": "Are you sure you want to delete the selected save game? This cannot be undone."
						}
					],
					"FooterChildren": [
						{
							"Type": "StackPanel",
							"Id": "load_delete_confirm_footer",
							"Orientation": "Horizontal",
							"Gap": 8,
							"HorizontalAlignment": "Right",
							"Children": [
								{
									"Type": "Button",
									"Id": "btn_load_delete_cancel",
									"Text": "Back",
									"Command": "client.persistence.close_delete_confirm"
								},
								{
									"Type": "Button",
									"Id": "btn_load_delete_confirm",
									"Text": "Delete",
									"Style": "Danger",
									"Command": "client.persistence.confirm_delete_selected_save"
								}
							]
						}
					]
				},
				{
					"Type": "Modal",
					"Id": "load_delete_all_confirm_modal",
					"Title": "Delete All Saves",
					"IsVisible": false,
					"CloseOnEscape": true,
					"CloseOnBackdropClick": false,
					"CloseCommand": "client.persistence.close_delete_all_confirm",
					"Width": "480px",
					"Height": "220px",
					"AccentVariant": "danger",
					"DisplayMode": "Pulse",
					"BadgeText": "Danger",
					"BadgeVariant": "danger",
					"Children": [
						{
							"Type": "Label",
							"Id": "lbl_load_delete_all_confirm",
							"Text": "Are you sure you want to delete ALL save games? This cannot be undone."
						}
					],
					"FooterChildren": [
						{
							"Type": "StackPanel",
							"Id": "load_delete_all_confirm_footer",
							"Orientation": "Horizontal",
							"Gap": 8,
							"HorizontalAlignment": "Right",
							"Children": [
								{
									"Type": "Button",
									"Id": "btn_load_delete_all_cancel",
									"Text": "Back",
									"Command": "client.persistence.close_delete_all_confirm"
								},
								{
									"Type": "Button",
									"Id": "btn_load_delete_all_confirm",
									"Text": "Delete All",
									"Style": "Danger",
									"Command": "client.persistence.confirm_delete_all_saves"
								}
							]
						}
					]
				},
				{
					"Type": "Modal",
					"Id": "load_compat_confirm_modal",
					"Title": "Load Game — Version Differences",
					"IsVisible": false,
					"CloseOnEscape": true,
					"CloseOnBackdropClick": false,
					"CloseCommand": "client.persistence.compat_load_cancel",
					"Width": "680px",
					"Height": "480px",
					"BadgeText": "Warning",
					"BadgeVariant": "warning",
					"AccentVariant": "warning",
					"DisplayMode": "Glow",
					"Children": [
						{
							"Type": "Label",
							"Id": "lbl_load_compat_title",
							"Text": "Load this save?"
						},
						{
							"Type": "Label",
							"Id": "lbl_load_compat_reason",
							"Text": "This save was created with a different configuration.",
							"Classes": ["ps-text-secondary"]
						},
						{
							"Type": "DataGrid",
							"Id": "compat_grid",
							"SelectionMode": "None",
							"AllowSorting": false,
							"Columns": [
								{ "Header": "Component", "Field": "dimension", "Flex": 2 },
								{ "Header": "Saved", "Field": "saved", "Flex": 2 },
								{ "Header": "Current", "Field": "current", "Flex": 2 },
								{ "Header": "Verdict", "Field": "verdict", "Flex": 2 }
							],
							"Rows": [],
							"Height": "100%"
						}
					],
					"FooterChildren": [
						{
							"Type": "StackPanel",
							"Id": "load_compat_footer",
							"Orientation": "Horizontal",
							"Gap": 8,
							"HorizontalAlignment": "Right",
							"Children": [
								{
									"Type": "Button",
									"Id": "btn_load_compat_proceed",
									"Text": "Load anyway",
									"Style": "Warning",
									"Command": "client.persistence.compat_load_proceed"
								},
								{
									"Type": "Button",
									"Id": "btn_load_compat_safemode",
									"Text": "Safe Mode",
									"TooltipText": "Loads the save and strips component data from mods that are no longer installed (missing mods), reporting what was affected. Safer than 'Load anyway' when a mod is missing. Note: currently reports the affected components; automatic removal is forthcoming.",
									"IsVisible": false,
									"Command": "client.persistence.compat_load_safemode"
								},
								{
									"Type": "Button",
									"Id": "btn_load_compat_cancel",
									"Text": "Cancel",
									"Command": "client.persistence.compat_load_cancel"
								}
							]
						}
					]
				}
			]
		}
	],
	"FooterChildren": [
		{
			"Type": "StackPanel",
			"Id": "load_browser_footer_left",
			"Orientation": "Horizontal",
			"Gap": 8,
			"HorizontalAlignment": "Left",
			"Children": [
				{
					"Type": "Button",
					"Id": "btn_load_game_cancel",
					"Text": "Back",
					"Command": "core.navigation.back"
				}
			]
		},
		{
			"Type": "StackPanel",
			"Id": "load_browser_footer_right",
			"Orientation": "Horizontal",
			"Gap": 8,
			"HorizontalAlignment": "Right",
			"Children": [
				{
					"Type": "Button",
					"Id": "btn_refresh",
					"Text": "Refresh",
					"Command": "client.persistence.request_save_slots"
				},
				{
					"Type": "Button",
					"Id": "btn_load_game_delete_all",
					"Text": "Delete All",
					"Style": "Danger",
					"IsVisible": false,
					"Command": "client.persistence.open_delete_all_confirm"
				},
				{
					"Type": "Button",
					"Id": "btn_load_game_rename",
					"Text": "Rename...",
					"IsEnabled": false,
					"Command": "client.persistence.open_rename"
				},
				{
					"Type": "Button",
					"Id": "btn_load_game_delete",
					"Text": "Delete",
					"Style": "Danger",
					"IsEnabled": false,
					"Command": "client.persistence.open_delete_confirm"
				},
				{
					"Type": "Button",
					"Id": "btn_load_game_confirm",
					"Text": "Load",
					"Style": "Primary",
					"IsEnabled": false,
					"Command": "client.persistence.trigger_load"
				}
			]
		}
	]
}
