@*

#### Add a new configuration for a service

*@

# @Message

@switch (PopupType) { case PopupType.Ok:
Ok
break; case PopupType.OkCancel:
Cancel
Ok
break; case PopupType.YesNo:
No
Yes
break; case PopupType.YesNoCancel:
Cancel
No
Yes
break; default: break; }

@code { [CascadingParameter] BlazoredModalInstance BlazoredModal { get; set; }

[Parameter, Required] public string Message { get; set; } [Parameter, Required] public PopupType PopupType { get; set; }

void Yes() => BlazoredModal.Close(ModalResult.Ok(PopupAnswer.Yes)); void No() => BlazoredModal.Close(ModalResult.Ok(PopupAnswer.No)); void Ok() => BlazoredModal.Close(ModalResult.Ok(PopupAnswer.Ok)); void Cancel() => BlazoredModal.Close(ModalResult.Ok(PopupAnswer.Cancel)); }