import { createStackNavigator } from '@react-navigation/stack';
import React from 'react';
import { useTranslation } from 'react-i18next';
import SettingsMenu from '../components/buttons/SettingsMenu';
import { useTheme } from '../contexts/theme';
import CredentialDetails from '../screens/CredentialDetails';
import ListCredentials from '../screens/ListCredentials';
import { Screens } from '../types/navigators';
import { useDefaultStackOptions } from './defaultStackOptions';
import { TOKENS, useServices } from '../container-api';
import OpenIDCredentialDetails from '../modules/openid/screens/OpenIDCredentialOffer';
const CredentialStack = () => {
  const Stack = createStackNavigator();
  const theme = useTheme();
  const {
    t
  } = useTranslation();
  const [CredentialListHeaderRight, ScreenOptionsDictionary] = useServices([TOKENS.COMPONENT_CRED_LIST_HEADER_RIGHT, TOKENS.OBJECT_SCREEN_CONFIG]);
  const defaultStackOptions = useDefaultStackOptions(theme);
  return /*#__PURE__*/React.createElement(Stack.Navigator, {
    screenOptions: {
      ...defaultStackOptions
    }
  }, /*#__PURE__*/React.createElement(Stack.Screen, {
    name: Screens.Credentials,
    component: ListCredentials,
    options: () => ({
      title: t('Screens.Credentials'),
      headerRight: () => /*#__PURE__*/React.createElement(CredentialListHeaderRight, null),
      headerLeft: () => /*#__PURE__*/React.createElement(SettingsMenu, null),
      ...ScreenOptionsDictionary[Screens.Credentials]
    })
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: Screens.CredentialDetails,
    component: CredentialDetails,
    options: {
      title: t('Screens.CredentialDetails'),
      ...ScreenOptionsDictionary[Screens.CredentialDetails]
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: Screens.OpenIDCredentialDetails,
    component: OpenIDCredentialDetails,
    options: {
      title: t('Screens.CredentialDetails'),
      ...ScreenOptionsDictionary[Screens.OpenIDCredentialDetails]
    }
  }));
};
export default CredentialStack;
//# sourceMappingURL=CredentialStack.js.map