@inherits FNZCM.BlazorWasm.UI.Components.FnzBoostrap.Bases.FnzBoostrapContainerComponentBase<FnzBoostrapModal,Options>
@code {
    [Parameter] public BackdropMode Backdrop { get => _options.Backdrop; set => _options.Backdrop = value; }
    [Parameter] public bool Keyboard { get => _options.Keyboard; set => _options.Keyboard = value; }
    [Parameter] public bool Focus { get => _options.Focus; set => _options.Focus = value; }
    [Parameter] public string CssClass { get; set; }
    [Parameter] public RenderFragment Title { get; set; }
    [Parameter] public RenderFragment Body { get; set; }
    [Parameter] public RenderFragment Footer { get; set; }
    [Parameter] public bool ShowCloseButton { get; set; } = true;

    protected override string Prefix => base.Prefix + ".modal";
}

<div class="modal fade" id="@ElementId">
    <div class="modal-dialog modal-dialog-centered @CssClass" @attributes="@InputAttributes">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">@Title</h5>
                @if (ShowCloseButton)
                {
                    <button hidd type="button" class="btn-close" @onclick="Hide"></button>
                }
            </div>
            <div class="modal-body">
                @Body
            </div>
            <div class="modal-footer">
                @if (Footer == null)
                {
                    if (ShowCloseButton)
                    {
                        <button class="btn btn-primary" @onclick="Hide">Close</button>
                    }
                }
                else
                {
                    @Footer
                }
            </div>
        </div>
    </div>
</div>

