"use client";

import type { ReactNode } from "react";
import { AccountProvider } from "@/contexts/AccountContext";
import { CartProvider } from "@/contexts/CartContext";
import { WalletProvider } from "@/contexts/WalletContext";

/** Account must wrap wallet so balance + vault ledger are keyed by the signed-in handle. */
export default function AppProviders({ children }: { children: ReactNode }) {
  return (
    <AccountProvider>
      <WalletProvider>
        <CartProvider>{children}</CartProvider>
      </WalletProvider>
    </AccountProvider>
  );
}
