<AdminPageHeader Title="@Title" Eyebrow="@Eyebrow" Subtitle="@Subtitle">
    <MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.FlexEnd" Spacing="1">
        @if (Actions is not null)
        {
            @Actions
        }
        <MudButton Variant="Variant.Outlined" StartIcon="@Icons.Material.Filled.Close" @onclick="OnCancel">
            @CancelText
        </MudButton>
    </MudStack>
</AdminPageHeader>

<AdminEditorPanel Loading="@Loading" SkeletonContent="@SkeletonContent">
    @ChildContent
</AdminEditorPanel>

@code {
    [Parameter, EditorRequired]
    public string Title { get; set; } = "";

    [Parameter, EditorRequired]
    public string Eyebrow { get; set; } = "";

    [Parameter]
    public string? Subtitle { get; set; }

    [Parameter, EditorRequired]
    public EventCallback OnCancel { get; set; }

    [Parameter]
    public string CancelText { get; set; } = "취소";

    [Parameter]
    public RenderFragment? Actions { get; set; }

    [Parameter]
    public bool Loading { get; set; }

    [Parameter]
    public RenderFragment? SkeletonContent { get; set; }

    [Parameter]
    public RenderFragment? ChildContent { get; set; }
}
