Editor/Stair/ArchStairSheet.cs
namespace Sunless.Architecture;

public sealed class ArchStairSheet : IArchSheet {
	public Type Payload => typeof( ArchStairPart );

	public void Build( ToolSidebarWidget panel, ArchTool tool, ArchSelection picked, Action refresh, Action changed ) {
		if ( picked.Item is not ArchStairPart stair ) {
			return;
		}

		panel.AddGroup( "Drawing" ).AddRow().Add( new Button.Primary( "Open the stair drawing", "draw" ) {
			Clicked = () => ArchStairWindow.Open( tool, stair )
		} );

		ArchStairUi.Build( panel, stair, refresh, changed );
		ArchStairUi.Sizes( panel, stair, changed );
	}
}