import React from 'react';
import { WixPatternsDashboardTestProvider } from './WixPatternsDashboardTestProvider';
import { WixPatternsProviderProps } from './WixPatternsDashboardBaseProvider';
import { WixPatternsDashboardProvider } from './WixPatternsDashboardProvider';

export function WixPatternsProvider(props: WixPatternsProviderProps) {
  // dashboard-react currently don't provide a testkit https://wix.slack.com/archives/C03MHSXEPAR/p1701178068285369?thread_ts=1699425570.036359&cid=C03MHSXEPAR
  if (process.env.NODE_ENV === 'test') {
    return <WixPatternsDashboardTestProvider {...props} />;
  }

  return <WixPatternsDashboardProvider {...props} />;
}
