Does anyone have a macro for toggling workbook protection?

E.g., run the macro and it unprotects the workbook if it's in a protected
state and vice versa.

Thanks for any help given!