"use client";

import type { ReactNode } from "react";

import { ChatProvider } from "@/stores/chat/chat-context";
import { PaymentProvider } from "@/stores/payment";
import {
  ChatAuthSync,
  ChatPaymentSuccessSync,
  PaymentSuccessSync,
} from "@/stores/sync";

export function ChatRouteProviders({ children }: { children: ReactNode }) {
  return (
    <PaymentProvider>
      <PaymentSuccessSync />
      <ChatProvider>
        <ChatAuthSync />
        <ChatPaymentSuccessSync />
        {children}
      </ChatProvider>
    </PaymentProvider>
  );
}
