{
	name = "Correspondence (On Right Side)";
	rootViewer =
	{
		viewerType = "MmSplitView";
		orientation = "horizontal";
		children =
		(
			{
				viewerType = "MmBoxView";
				orientation = "vertical";
				defaultSize = 200;
				minWidth = 100;
				autoresize = 0;
				toggleMenuTitle = "Mailboxes";
				toggleKeyEquivalent = "^~@d";

				dragRect = { width = 16.0; height = 16.0; location = "bottomRight"; };

				children =
				(
					{
						identifier = "mailboxesOutline";
						viewerType = "MmMailboxesOutlineView";
						stickyMessages = 1;
					},
					{
						viewerType = "MmMailboxesStatusBar";
					},
				);
			},
			{
				viewerType = "MmSplitView";
				orientation = "vertical";
				collapsibleSubview = 2; // Incomplete support -- no way to get it back (1 = first, 2 = last)
				children =
				(
					{
						identifier = "pathOutlineBox";
						viewerType = "MmBoxView";
						orientation = "vertical";
						defaultSize = 250;
						autoresize = 0;
						children =
						(
							{
								identifier = "pathControl";
								viewerType = "MmPathControlView";
								sources = ( { sourceIdentifier = "mailboxesOutline"; } );
							},
							{	viewerType = "MmSeparatorView"; showWithViews = ( "pathControl" ); },
							{
								viewerType = "MmSplitView";
								minHeight = 50;
								orientation = "horizontal";
								children =
								(
									{
										identifier = "mainOutline";
										viewerType = "MmMessagesOutlineView";
										// columnSettings = "outlineColumns";
										sources = ( { sourceIdentifier = "pathControl"; } );
										defaultSize = 350;
									},
									// {
									// 	identifier = "locator";
									// 	viewerType = "MmLocatorView";
									// 	sources = ( { sourceIdentifier = "mainOutline"; } );
									// 	canBecomeKeyView = 0; // Not implemented
									// },
								);
							},
						);
					},
					{
						viewerType = "MmSplitView";
						orientation = "horizontal";
						children =
						(
							{
								viewerType = "MmBoxView";
								orientation = "vertical";
								children =
								(
									{
										identifier = "headersView";
										viewerType = "MmHeadersView";
										sources = ( { sourceIdentifier = "correspondenceOutline"; } );
										inject = ( "headersFormatting.plist" );
									},
									{	viewerType = "MmSeparatorView"; showWithViews = ( "headersView" ); },
									{
										identifier = "tagsEditor";
										viewerType = "MmTagsEditor";
										sources = ( { sourceIdentifier = "correspondenceOutline"; } );
									},
									{	viewerType = "MmSeparatorView"; showWithViews = ( "tagsEditor" ); },
									{
										identifier = "blockingView";
										viewerType = "MmImageBlockingView";
										sources = ( { sourceIdentifier = "correspondenceOutline"; } );
										transformation = "$correspondenceOutline.filter(##blocked-count exists)";
									},
									{	viewerType = "MmSeparatorView"; showWithViews = ( "blockingView" ); },
									{
										identifier = "securityView";
										viewerType = "MmSecurityView";
										sources = ( { sourceIdentifier = "correspondenceOutline"; } );
										transformation = "$correspondenceOutline.filter(##security-problem exists)";
									},
									{	viewerType = "MmSeparatorView"; showWithViews = ( "securityView" ); },
									{
										identifier = "messageView";
										viewerType = "MmWebView";
										sources = ( { sourceIdentifier = "correspondenceOutline"; } );
										minWidth = 175;
										minHeight = 50;
									},
								);
							},
							{
								viewerType = "MmBoxView";
								orientation = "vertical";
								defaultSize = 200;
								autoresize = 0;
								children =
								(
									{
										viewerType = "MmLabelView";
										label = "Correspondence";
									},
									{	viewerType = "MmSeparatorView"; },
									{
										identifier = "correspondenceOutline";
										viewerType = "MmMessagesOutlineView";
										minWidth = 100;
										sources = ( { sourceIdentifier = "mainOutline"; } );
										selectionSources = ( { sourceIdentifier = "mainOutline"; } );
										// FIXME: The transformation does not work 'per' message, i.e., it tries to combine any 'from' with any 'to' in $mainOutline.
										transformation = "$ALL_MESSAGES.filter((from.address = $mainOutline.from.address and #recipient.address = $mainOutline.#recipient.address) or (from.address = $mainOutline.#recipient.address and #recipient.address = $mainOutline.from.address))";
										defaultColumns = ( "subject", "relativeDate" );
										outlineColumn = "subject";
									},
								);

								toggleMenuTitle = "Correspondence View";
								toggleKeyEquivalent = "^~@c";
							},
						);

						toggleMenuTitle = "Message View";
						toggleKeyEquivalent = "^~@h";
					},
					// {
					// 	identifier = "messageEditor";
					// 	viewerType = "MmMessageTextView";
					// 	sources = ( { sourceIdentifier = "correspondenceOutline"; } );
					// 	minimumNumberOfMessages = 1;
					// 	maximumNumberOfMessages = 1;
					// 	match = "$correspondenceOutline.filter(#flags.flag = '\\Draft')"; // Only match drafts
					// },
				);
			},
		);
	};
}
