@using TaxBaik.Application.DTOs @using TaxBaik.Domain.Entities @foreach (var category in Categories) { @category.Name } @code { [Parameter, EditorRequired] public BlogFormModel Model { get; set; } = new(); [Parameter] public IReadOnlyList Categories { get; set; } = []; [Parameter] public string SubmitText { get; set; } = "저장"; [Parameter] public EventCallback OnSubmit { get; set; } [Parameter] public EventCallback OnCancel { get; set; } private MudForm? form; private async Task HandleSubmit() { if (form == null) return; await form.Validate(); if (!form.IsValid) return; await OnSubmit.InvokeAsync(); } public class BlogFormModel { public string Title { get; set; } = ""; public string Content { get; set; } = ""; public int? CategoryId { get; set; } public string? Tags { get; set; } public string? SeoTitle { get; set; } public string? SeoDescription { get; set; } public bool IsPublished { get; set; } } }