<div class="d-flex gap-2">
    <MudButton Variant="@SubmitVariant"
               Color="@SubmitColor"
               StartIcon="@SubmitIcon"
               @onclick="OnSubmit"
               Disabled="@IsSubmitting">
        @(IsSubmitting ? LoadingText : SubmitText)
    </MudButton>
    @if (OnCancel.HasDelegate)
    {
        <MudButton Variant="Variant.Outlined" @onclick="OnCancel">
            @CancelText
        </MudButton>
    }
</div>

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

    [Parameter]
    public string LoadingText { get; set; } = "저장 중...";

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

    [Parameter]
    public Variant SubmitVariant { get; set; } = Variant.Filled;

    [Parameter]
    public Color SubmitColor { get; set; } = Color.Primary;

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

    [Parameter]
    public EventCallback OnSubmit { get; set; }

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

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