import React from 'react';
import { UseAppModuleHookEntity } from './app-module.entity';
import { BaseEntity } from '@pos/base/domain/entities';
import { ModuleProviderContext } from './app-module.provider';

export function useAppModule<E extends BaseEntity = BaseEntity>() {
  return React.useContext<UseAppModuleHookEntity<E>>(ModuleProviderContext);
}
