"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _stack = require("@react-navigation/stack");
var _react = _interopRequireDefault(require("react"));
var _reactI18next = require("react-i18next");
var _SettingsMenu = _interopRequireDefault(require("../components/buttons/SettingsMenu"));
var _theme = require("../contexts/theme");
var _CredentialDetails = _interopRequireDefault(require("../screens/CredentialDetails"));
var _ListCredentials = _interopRequireDefault(require("../screens/ListCredentials"));
var _navigators = require("../types/navigators");
var _defaultStackOptions = require("./defaultStackOptions");
var _containerApi = require("../container-api");
var _OpenIDCredentialOffer = _interopRequireDefault(require("../modules/openid/screens/OpenIDCredentialOffer"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const CredentialStack = () => {
  const Stack = (0, _stack.createStackNavigator)();
  const theme = (0, _theme.useTheme)();
  const {
    t
  } = (0, _reactI18next.useTranslation)();
  const [CredentialListHeaderRight] = (0, _containerApi.useServices)([_containerApi.TOKENS.COMPONENT_CRED_LIST_HEADER_RIGHT]);
  const defaultStackOptions = (0, _defaultStackOptions.useDefaultStackOptions)(theme);
  return /*#__PURE__*/_react.default.createElement(Stack.Navigator, {
    screenOptions: {
      ...defaultStackOptions
    }
  }, /*#__PURE__*/_react.default.createElement(Stack.Screen, {
    name: _navigators.Screens.Credentials,
    component: _ListCredentials.default,
    options: () => ({
      title: t('Screens.Credentials'),
      headerRight: () => /*#__PURE__*/_react.default.createElement(CredentialListHeaderRight, null),
      headerLeft: () => /*#__PURE__*/_react.default.createElement(_SettingsMenu.default, null)
    })
  }), /*#__PURE__*/_react.default.createElement(Stack.Screen, {
    name: _navigators.Screens.CredentialDetails,
    component: _CredentialDetails.default,
    options: {
      title: t('Screens.CredentialDetails')
    }
  }), /*#__PURE__*/_react.default.createElement(Stack.Screen, {
    name: _navigators.Screens.OpenIDCredentialDetails,
    component: _OpenIDCredentialOffer.default,
    options: {
      title: t('Screens.CredentialDetails')
    }
  }));
};
var _default = exports.default = CredentialStack;
//# sourceMappingURL=CredentialStack.js.map