import Link from 'next/link' import { AccountStatus, SubAccountNavigation } from 'components/Account' import CircularProgress from 'components/CircularProgress' import Logo from 'components/Icons/logo.svg' import Modal from 'components/Modal' import { menuTree, NavLink } from 'components/Navigation' import SearchInput from 'components/Navigation/SearchInput' import Text from 'components/Text' import Wallet from 'components/Wallet' import useCreateCreditAccount from 'hooks/mutations/useCreateCreditAccount' import useDeleteCreditAccount from 'hooks/mutations/useDeleteCreditAccount' import useCreditAccounts from 'hooks/useCreditAccounts' import useCreditManagerStore from 'stores/useCreditManagerStore' import useWalletStore from 'stores/useWalletStore' const Navigation = () => { const address = useWalletStore((s) => s.address) const selectedAccount = useCreditManagerStore((s) => s.selectedAccount) const setSelectedAccount = useCreditManagerStore((s) => s.actions.setSelectedAccount) const { mutate: createCreditAccount, isLoading: isLoadingCreate } = useCreateCreditAccount() const { mutate: deleteCreditAccount, isLoading: isLoadingDelete } = useDeleteCreditAccount( selectedAccount || '', ) const { data: creditAccountsList, isLoading: isLoadingCreditAccounts } = useCreditAccounts() const isConnected = !!address const hasCreditAccounts = creditAccountsList && creditAccountsList.length > 0 return (