I have a list of items, each item has a "Delete" button. Pressing the button should show a dialog asking the user to confirm the deletion, and include the name of the item being deleted.
Currently, I have this, which works:
In the viewmodel
// The dialog's state. Either hidden or visible. If visible it needs to display
// text specific to the item associated with the button the user pressed.
sealed interface ConfirmDeleteItemDialogState {