@*
T33b: body component for the "Move template" dialog hosted by
IDialogService.ShowAsync. Renders ONLY the picker + action buttons inside the
host's .modal-body; the host owns the backdrop, header, and focus trap. Closes
with a MoveTemplateResult carrying the picked folder id (null = Root) — a result
record so Close(null) for the Root choice stays distinguishable from a Cancel.
*@
@code {
/// Host-supplied context used to close (with the picked folder id) or cancel.
[Parameter] public DialogContext Context { get; set; } = default!;
[Parameter] public IEnumerable<(int? Id, string Label)> FolderOptions { get; set; } = Array.Empty<(int?, string)>();
private int? _targetFolderId;
private void Submit() => Context.Close(new MoveTemplateResult(_targetFolderId));
///
/// Result of the move-template picker. A reference type so a non-null close is
/// distinguishable from a cancel even when the picked folder is null (Root):
/// ShowAsync resolves to this record on Move and to null on Cancel.
///
/// The chosen destination folder id, or null for Root.
public sealed record MoveTemplateResult(int? NewFolderId);
}