import { useContext } from 'react';
import { SystemSettingsContext } from 'src/contexts/systemSettingsContext';

export const useSystemSettingsContext = () => {
  const context = useContext(SystemSettingsContext);

  if (!context) {
    throw new Error('useSystemSettingsContext must be used within a SystemSettingsContextProvider');
  }

  return { ...context };
};
