@namespace Connected.Components
@inherits UIComponent

<div @attributes="CustomAttributes" id="@_elementId" class="dialog-container @Position">
    <Overlay Visible="true" OnClick="HandleBackgroundClick" Class="overlay-dialog" DarkBackground="true" />
    <div id="_@Id.ToString("N")" role="dialog" class="@Classname">
        @if (!NoHeader)
        {
            <div class="dialog-title">
                @if (TitleContent == null)
                {
                    <TextContent Typo="Typo.h6">@Title</TextContent>
                }
                else
                {
                    @TitleContent
                }
                @if (CloseButton)
                {
                    <IconButton aria-label="close" Icon="@CloseIcon" @onclick="Cancel"/>
                }
            </div>
         }
        <CascadingValue Value="this" IsFixed="true">
            @Content
        </CascadingValue>
    </div>
</div>
