@* Formulaire d'une fiche livre, partagé par l'ajout (ISBN ou manuel) et l'édition. Le pré-remplissage par ISBN est une AIDE, pas une contrainte : tous les champs restent modifiables, et une fiche incomplète peut toujours être complétée à la main (CLAUDE.md). *@
@if (!string.IsNullOrEmpty(Saisie.CoverUrl) || !string.IsNullOrWhiteSpace(Saisie.Titre)) {
}
Format
@foreach (var format in Formats) { }
Statut de lecture
@foreach (var statut in Statuts) { }
@if (!string.IsNullOrEmpty(Erreur)) { }
@if (OnAnnuler.HasDelegate) { }
@code { private static readonly Format[] Formats = Enum.GetValues(); private static readonly Statut[] Statuts = Enum.GetValues(); [Parameter, EditorRequired] public EnregistrementLivre Saisie { get; set; } = new(); [Parameter] public string LibelleValidation { get; set; } = "Enregistrer"; [Parameter] public string? Erreur { get; set; } [Parameter] public bool EnCours { get; set; } [Parameter] public EventCallback OnValider { get; set; } [Parameter] public EventCallback OnAnnuler { get; set; } private Task Valider() => OnValider.InvokeAsync(); }