Hi Reema,
From the documentation: the Navigation Menu class should be the class on the navigation menu itself while the Sidebar class should be the class on the highest level of that layout section. These are used to find the navigation menu and the sidebar in the DOM and adds a watcher for when the menu is opened and closed. If you do not have a collapsable menu, you do not need Navigation Menu or Sidebar Class.
If you are really struggling with setting up the classes maybe check out the demo project of the widget: https://widgettesting105-sandbox.mxapps.io/p/unsaved-changes-message
https://marketplace.mendix.com/link/component/207417