"use client";

import type { ReactNode } from "react";

import { PaymentProvider } from "@/stores/payment/payment-context";
import { PaymentSuccessSync } from "@/stores/sync/payment-success-sync";

export interface PaymentRouteProviderProps {
  children: ReactNode;
  scopeKey?: string;
}

export function PaymentRouteProvider({
  children,
  scopeKey,
}: PaymentRouteProviderProps) {
  return (
    <PaymentProvider key={scopeKey}>
      <PaymentSuccessSync />
      {children}
    </PaymentProvider>
  );
}
