using Microsoft.AspNetCore.Components; namespace AIStudio.Assistants.SWOTAnalysis; /// /// Places the four SWOT quadrants side by side, or below each other when the space is too narrow. /// /// /// Each quadrant shows its name, where it lies on both axes, and its color, so the live progress and /// the result look the same. The grid decides by the width it has, not by the width of the window: /// the assistant and the chat give it very different widths. /// public partial class SwotQuadrantGrid { /// /// The quadrants in the order of the matrix: the internal ones first, the positive ones left. /// private static readonly SwotAnalysisCategory[] CATEGORIES = Enum.GetValues(); /// /// The names of the quadrants and the ends of the axes. /// [Parameter, EditorRequired] public SwotQuadrantLabels Labels { get; set; } = null!; /// /// What a quadrant shows below its name. /// [Parameter, EditorRequired] public RenderFragment ChildContent { get; set; } = null!; private static string CssClassOf(SwotAnalysisCategory category) => category switch { SwotAnalysisCategory.STRENGTHS => "swot-strengths", SwotAnalysisCategory.WEAKNESSES => "swot-weaknesses", SwotAnalysisCategory.OPPORTUNITIES => "swot-opportunities", SwotAnalysisCategory.THREATS => "swot-threats", _ => string.Empty, }; }