Utility class for calculating a hash of menu content to detect changes
Calculates a hash of the menu content by capturing the menu structure This function should be called from a @Composable context to track state changes