import { ReactNode } from "react";

import { ActionsManagerProvider } from "./ActionsManagerContext";
import { AttributesManagerProvider } from "./AttributesManagerContext";
import { CharacterFeaturesManagerProvider } from "./CharacterFeaturesManagerContext";
import { CoinManagerProvider } from "./CoinManagerContext";
import { ExtrasManagerProvider } from "./ExtrasManagerContext";
import { InventoryManagerProvider } from "./InventoryManagerContext";
import { SpellsManagerProvider } from "./SpellsManagerContext";

export const Managers = ({ children }: { children?: ReactNode }) => (
  <ActionsManagerProvider>
    <AttributesManagerProvider>
      <ExtrasManagerProvider>
        <SpellsManagerProvider>
          <CharacterFeaturesManagerProvider>
            <InventoryManagerProvider>
              <CoinManagerProvider>{children}</CoinManagerProvider>
            </InventoryManagerProvider>
          </CharacterFeaturesManagerProvider>
        </SpellsManagerProvider>
      </ExtrasManagerProvider>
    </AttributesManagerProvider>
  </ActionsManagerProvider>
);
