/*
 * File: useFilterCases.ts
 * Description: Custom hook for filtering cases by status
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */

import { useMemo } from 'react';
import { Case } from '../redux/dashboardSlice';

/**
 * useFilterCases - returns filtered cases by status
 */
export const useFilterCases = (cases: Case[], status: 'critical' | 'urgent' | 'routine') => {
  return useMemo(() => cases.filter(c => c.status === status), [cases, status]);
};

/*
 * End of File: useFilterCases.ts
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */ 