import { createStackNavigator } from '@react-navigation/stack';
import React from 'react';
import { useTranslation } from 'react-i18next';
import SettingsMenu from '../components/buttons/SettingsMenu';
import { useConfiguration } from '../contexts/configuration';
import { useTheme } from '../contexts/theme';
import CredentialDetails from '../screens/CredentialDetails';
import ListCredentials from '../screens/ListCredentials';
import { Screens } from '../types/navigators';
import { createDefaultStackOptions } from './defaultStackOptions';
const CredentialStack = () => {
  const Stack = createStackNavigator();
  const theme = useTheme();
  const {
    t
  } = useTranslation();
  const {
    credentialListHeaderRight: CredentialListHeaderRight
  } = useConfiguration();
  const defaultStackOptions = createDefaultStackOptions(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)
    })
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: Screens.CredentialDetails,
    component: CredentialDetails,
    options: {
      title: t('Screens.CredentialDetails')
    }
  }));
};
export default CredentialStack;
//# sourceMappingURL=CredentialStack.js.map