import React from 'react';
import { RouterProvider } from './provider';
import {RouterCurrent} from './router.current';
import {YRouterProps} from './router.interface';


export const YRouter: React.FC<YRouterProps> = ({ children, config }) => {
  return (
    <RouterProvider config={config}>
      <RouterCurrent>
         {children}
      </RouterCurrent>
    </RouterProvider>
  );
};
