namespace ZB.MOM.WW.ScadaBridge.CentralUI.Components.Shared; /// /// Centralised dialog/modal service. Pages inject this service and call /// or programmatically /// instead of embedding per-page modal components. A single DialogHost /// rendered in MainLayout displays the resulting dialog state. /// public interface IDialogService { /// /// Shows a confirmation dialog and resolves to true when the user /// confirms, or false when the user cancels (button click, Escape, /// or backdrop dismiss). /// /// Modal title text. /// Body text shown to the user. /// When true, the confirm button renders in /// btn-danger styling with the label "Delete"; otherwise a primary /// "Confirm" button is shown. Task ConfirmAsync(string title, string message, bool danger = false); /// /// Shows a single-line text prompt and resolves to the entered value, or /// null if the user cancels. /// /// Modal title text. /// Label rendered above the input field. /// Pre-populated value for the input field. /// Optional placeholder shown when the input is empty. Task PromptAsync(string title, string label, string initialValue = "", string? placeholder = null); }