\n {item?.subNavigations?.map((itemSub, index) => {\n return (\n
\n \n {itemSub?.textWithPath?.text}\n \n {itemSub?.subMenusWithPaths && (\n {\n if (subNavIndex === index) {\n setShowSubMenus(false);\n setSubNavIndex(-1);\n } else {\n setShowSubMenus(true);\n setSubNavIndex(index);\n }\n }}\n >\n \n \n )}\n {index === subNavIndex &&\n itemSub?.subMenusWithPaths &&\n showSubNavigation &&\n showSubMenus && (\n \n {itemSub?.subMenusWithPaths?.map(\n (itemSubMenu, index) => {\n return (\n \n \n {itemSubMenu?.text ??\n itemSubMenu?.textWithPath?.text}\n \n \n );\n }\n )}\n
\n )}\n \n );\n })}\n
\n )}\n