/*
 * File: TabNavigator.tsx
 * Description: Bottom tab navigator with Dashboard, CaseReview, and Profile tabs
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */

import React from 'react';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { DashboardNavigator } from '../modules/Dashboard/navigation';
import { CaseReviewNavigator } from '../modules/CaseReview/navigation';
import { ProfileNavigator } from '../modules/Profile/navigation';
import { Colors } from '../../shared/src/theme';
import { CustomIcon } from '../../shared/src/components/Icons';

export type TabParamList = {
  Dashboard: undefined;
  CaseReview: undefined;
  Profile: undefined;
};

const Tab = createBottomTabNavigator<TabParamList>();

/**
 * TabNavigator - bottom tab navigation for main app
 */
const TabNavigator: React.FC = () => (
  <Tab.Navigator
    initialRouteName="Dashboard"
    screenOptions={({ route }) => ({
      headerShown: false,
      tabBarActiveTintColor: Colors.primary,
      tabBarInactiveTintColor: Colors.textMuted,
      tabBarStyle: { backgroundColor: Colors.background },
      tabBarIcon: ({ color, size }) => {
        let iconName = '';
        if (route.name === 'Dashboard') iconName = 'view-dashboard';
        else if (route.name === 'CaseReview') iconName = 'file-search';
        else if (route.name === 'Profile') iconName = 'account-circle';
        return <CustomIcon name={iconName} size={size} color={color} />;
      },
    })}
  >
    <Tab.Screen name="Dashboard" component={DashboardNavigator} />
    <Tab.Screen name="CaseReview" component={CaseReviewNavigator} />
    <Tab.Screen name="Profile" component={ProfileNavigator} />
  </Tab.Navigator>
);

export default TabNavigator;

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