import { Stack, useRouter } from "expo-router";
import { useTranslation } from "react-i18next";

function JobsStack() {
  const router = useRouter();
  const { t } = useTranslation();
  return (
    <Stack
      screenOptions={{
        headerTitleStyle: {
          fontWeight: "bold",
        },
      }}
    >
      <Stack.Screen
        name="index"
        options={{
          headerShown: false,
          title: t("joblist.titles.jobtab"),
          // headerSearchBarOptions: {
          //   placement: "automatic",
          //   placeholder: "Search",
          //   onChangeText: (event) => {
          //     router.setParams({
          //       search: event?.nativeEvent?.text,
          //     });
          //   },
          // },
        }}
      />
      <Stack.Screen
        name="[jobId]"
        options={({ route }) => ({
          //headerShown: false,
          title: (route.params as any)?.title || "Job Details",
        })}
      />
    </Stack>
  );
}

export default JobsStack;
