'use client';

import { ComplianceProvider } from '@breakpilot/compliance-sdk-react';

export function Providers({ children }: { children: React.ReactNode }) {
  const apiEndpoint = process.env.NEXT_PUBLIC_API_ENDPOINT || 'http://localhost:8080/api/v1';
  const apiKey = process.env.NEXT_PUBLIC_API_KEY || '';
  const tenantId = process.env.NEXT_PUBLIC_TENANT_ID || 'default';

  return (
    <ComplianceProvider
      apiEndpoint={apiEndpoint}
      apiKey={apiKey}
      tenantId={tenantId}
      options={{
        autoLoadState: true,
        persistState: true,
      }}
    >
      {children}
    </ComplianceProvider>
  );
}
