@namespace Connected.Components
@inherits UIComponent

<div @attributes="CustomAttributes" class="@Classname">
    <div class="expand-panel-header" @onclick="ToggleExpansion">
        <div class="expand-panel-text">
            @if (TitleContent != null)
            {
                @TitleContent
            }
            else
            {
                @Text
            }
        </div>
        @if (!HideIcon)
        {
            <Icon Icon="@Icon" class="@(IsExpanded? "expand-panel-icon mud-transform" : "expand-panel-icon")" />
        }
    </div>
    <Collapse Expanded="@_collapseIsExpanded" MaxHeight="@MaxHeight">
        <div class="@PanelContentClassname">
            @ChildContent
        </div>
    </Collapse>
</div>
