<MudPaper Outlined="true" 
          class="@(Comment.IsAdmin ? "border-solid border-blue-500 p-2" : "p-2")"
          @attributes="CapturedAttributes">
    <MudGrid>
        <MudItem sm="8">
            <MudField Label="عنوان" DisableUnderLine="true" Variant="Variant.Text">@Comment.Title</MudField>
        </MudItem>
        <MudItem sm="4">
            <MudField Label="نام نام خانوادگی" DisableUnderLine="true" Variant="Variant.Text">@Comment.UserFullName</MudField>
        </MudItem>
        <MudItem sm="12">
            <MudTextField @bind-Value="@Comment.Content" DisableUnderLine="true" Lines="4" ReadOnly="true" T="string" Label="متن نظر" Variant="Variant.Outlined"></MudTextField>
        </MudItem>
    </MudGrid>
    @foreach (var item in Comment.Children)
    {
        <CommentItemTemplate class="mr-3 mt-2 p-2" Comment="item" />
    }
</MudPaper>


@code {
    [Parameter]
    public CommentSDto Comment { get; set; }

    [Parameter(CaptureUnmatchedValues = true)]
    public Dictionary<string, object> CapturedAttributes { get; set; } = new();
}
