/**
 * Helper function to get the selected sub user key from Redux state
 * @param {Object} state - Redux state
 * @returns {string|null} - The sub user key or null if not available
 */
export const getSelectedSubUserKey = (state) => {
  const selectedSubUser = state?.userSlice?.selectedSubUser;
  return selectedSubUser?.key || null;
};

export default getSelectedSubUserKey;
