Returning data from a subview to a view

Career programmer, but fairly new to Swift.

I'm doing a simple UI which has a list of names (from an array, which each name a NavigationLink). Selecting a name launches a subview which shows attributes associated with that name.

When the "Done" button is selected on the subview, I'd like to return data to the primary view so that I know it's been "processed", so I can style that name differently (and disable the NavigationLink).

There's also a "Cancel" button on the subview, which, when selected, I'd like to return, but be able to select the name again.