import { createStackNavigator } from '@react-navigation/stack';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { TOKENS, useContainer } from '../container-api';
import { useTheme } from '../contexts/theme';
import CredentialDetails from '../screens/CredentialDetails';
import CredentialOffer from '../screens/CredentialOffer';
import ProofRequest from '../screens/ProofRequest';
import { Screens } from '../types/navigators';
import { createDefaultStackOptions } from './defaultStackOptions';
const NotificationStack = () => {
  var _customNotification$a;
  const Stack = createStackNavigator();
  const theme = useTheme();
  const {
    t
  } = useTranslation();
  const defaultStackOptions = createDefaultStackOptions(theme);
  const container = useContainer();
  const {
    customNotificationConfig: customNotification
  } = container.resolve(TOKENS.NOTIFICATIONS);
  return /*#__PURE__*/React.createElement(Stack.Navigator, {
    screenOptions: {
      ...defaultStackOptions
    }
  }, /*#__PURE__*/React.createElement(Stack.Screen, {
    name: Screens.CredentialDetails,
    component: CredentialDetails,
    options: {
      title: t('Screens.CredentialDetails')
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: Screens.CredentialOffer,
    component: CredentialOffer,
    options: {
      title: t('Screens.CredentialOffer')
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: Screens.ProofRequest,
    component: ProofRequest,
    options: {
      title: t('Screens.ProofRequest')
    }
  }), customNotification && /*#__PURE__*/React.createElement(Stack.Screen, {
    name: Screens.CustomNotification,
    component: customNotification.component,
    options: {
      title: t(customNotification.pageTitle)
    }
  }), customNotification && ((_customNotification$a = customNotification.additionalStackItems) === null || _customNotification$a === void 0 ? void 0 : _customNotification$a.length) && customNotification.additionalStackItems.map(item => /*#__PURE__*/React.createElement(Stack.Screen, {
    name: item.name,
    component: item.component,
    options: item.stackOptions
  })));
};
export default NotificationStack;
//# sourceMappingURL=NotificationStack.js.map