"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = PageRenderer;
var _native = require("@react-navigation/native");
var React = _interopRequireWildcard(require("react"));
var _nativeStack = require("@react-navigation/native-stack");
var _useAuth = _interopRequireDefault(require("../hooks/useAuth"));
var _SocialHomePage = _interopRequireDefault(require("../../social/screens/SocialHomePage"));
var _PostDetail = _interopRequireDefault(require("../../social/screens/PostDetail"));
var _CreatePost = _interopRequireDefault(require("../../social/screens/CreatePost"));
var _screens = require("../../social/screens");
var _CreateCommunity = _interopRequireDefault(require("../../social/screens/CreateCommunity"));
var _reactNativePaper = require("react-native-paper");
var _PostTypeChoiceModal = _interopRequireDefault(require("../../social/components/legacy/PostTypeChoiceModal/PostTypeChoiceModal"));
var _CreateStoryScreen = _interopRequireDefault(require("../../social/screens/CreateStory/CreateStoryScreen"));
var _Toast = _interopRequireDefault(require("../../social/components/legacy/Toast/Toast"));
var _SocialGlobalSearch = _interopRequireDefault(require("../../social/screens/SocialGlobalSearch"));
var _MyCommunitiesSearch = _interopRequireDefault(require("../../social/screens/MyCommunitiesSearch"));
var _PostTargetSelection = _interopRequireDefault(require("../../social/screens/PostTargetSelection"));
var _TargetSelection = _interopRequireDefault(require("../../social/features/story/TargetSelection/TargetSelection"));
var _AllCategories = _interopRequireDefault(require("../../social/screens/AllCategories"));
var _CommunitiesByCategory = _interopRequireDefault(require("../../social/screens/CommunitiesByCategory"));
var _EditPost = _interopRequireDefault(require("../../social/screens/EditPost/EditPost"));
var _Explore = _interopRequireDefault(require("../../social/features/feed/components/Explore"));
var _PollPostComposer = _interopRequireDefault(require("../../social/screens/PollPostComposer"));
var _CommunityAddCategory = _interopRequireDefault(require("../../social/screens/CommunityAddCategory"));
var _CommunityAddMember = _interopRequireDefault(require("../../social/screens/CommunityAddMember"));
var _EditCommunity = _interopRequireDefault(require("../../social/screens/EditCommunity"));
var _CommunityPostPermission = _interopRequireDefault(require("../../social/screens/CommunityPostPermission"));
var _CommunityStorySetting = _interopRequireDefault(require("../../social/screens/CommunityStorySetting"));
var _CommunityNotificationSetting = require("../../social/screens/CommunityNotificationSetting");
var _CommunityPostsNotificationSetting = require("../../social/screens/CommunityPostsNotificationSetting");
var _CommunityCommentsNotificationSetting = require("../../social/screens/CommunityCommentsNotificationSetting");
var _CommunityStoriesNotificationSetting = require("../../social/screens/CommunityStoriesNotificationSetting");
var _CommunityLivestreamsNotificationSetting = require("../../social/screens/CommunityLivestreamsNotificationSetting");
var _CommunityPendingRequest = _interopRequireDefault(require("../../social/screens/CommunityPendingRequest"));
var _CommunitySetting = _interopRequireDefault(require("../../social/screens/CommunitySetting"));
var _CommunityProfile = _interopRequireDefault(require("../../social/screens/CommunityProfile"));
var _LivestreamTerminated = _interopRequireDefault(require("../../social/screens/LivestreamTerminated"));
var _PollTargetSelection = _interopRequireDefault(require("../../social/screens/PollTargetSelection"));
var _LivestreamPostTargetSelection = _interopRequireDefault(require("../../social/screens/LivestreamPostTargetSelection"));
var _CommunityMembership = _interopRequireDefault(require("../../social/screens/CommunityMembership"));
var _CreateLivestream = _interopRequireDefault(require("../../social/screens/CreateLivestream"));
var _LivestreamPlayer = _interopRequireDefault(require("../../social/screens/LivestreamPlayer"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
function PageRenderer({
  children
}) {
  var _children$type, _children$type2;
  const Stack = (0, _nativeStack.createNativeStackNavigator)();
  const {
    isConnected
  } = (0, _useAuth.default)();
  const theme = (0, _reactNativePaper.useTheme)();
  return /*#__PURE__*/React.createElement(_native.NavigationIndependentTree, null, /*#__PURE__*/React.createElement(_native.NavigationContainer, null, isConnected && /*#__PURE__*/React.createElement(Stack.Navigator, {
    id: undefined,
    screenOptions: {
      headerShown: false,
      headerShadowVisible: false,
      contentStyle: {
        backgroundColor: theme.colors.background
      },
      headerStyle: {
        backgroundColor: theme.colors.background
      },
      headerTitleStyle: {
        color: theme.colors.base
      }
    },
    initialRouteName: ((_children$type = children.type) === null || _children$type === void 0 ? void 0 : _children$type.displayName) || ((_children$type2 = children.type) === null || _children$type2 === void 0 ? void 0 : _children$type2.name)
  }, /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmityStoryTabComponent",
    children: () => children
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmityPostEngagementContentComponent",
    children: () => children
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmitySocialHomePage",
    component: _SocialHomePage.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmitySocialGlobalSearchPage",
    component: _SocialGlobalSearch.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmityMyCommunitiesSearchPage",
    component: _MyCommunitiesSearch.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmityExploreComponent",
    component: _Explore.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AllCategoriesPage",
    component: _AllCategories.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunitiesByCategoryPage",
    component: _CommunitiesByCategory.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CreateCommunity",
    component: _CreateCommunity.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityAddCategory",
    component: _CommunityAddCategory.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityAddMember",
    component: _CommunityAddMember.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityProfilePage",
    children: () => /*#__PURE__*/React.createElement(_CommunityProfile.default, children.props)
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityPendingRequest",
    component: _CommunityPendingRequest.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunitySetting",
    component: _CommunitySetting.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "EditCommunity",
    component: _EditCommunity.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityMembership",
    component: _CommunityMembership.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityPostPermission",
    component: _CommunityPostPermission.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityStorySetting",
    component: _CommunityStorySetting.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityNotificationSetting",
    component: _CommunityNotificationSetting.CommunityNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityPostsNotificationSetting",
    component: _CommunityPostsNotificationSetting.CommunityPostsNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityCommentsNotificationSetting",
    component: _CommunityCommentsNotificationSetting.CommunityCommentsNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityStoriesNotificationSetting",
    component: _CommunityStoriesNotificationSetting.CommunityStoriesNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityLivestreamsNotificationSetting",
    component: _CommunityLivestreamsNotificationSetting.CommunityLivestreamsNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "PostTargetSelection",
    component: _PostTargetSelection.default,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CreatePost",
    component: _CreatePost.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "EditPost",
    component: _EditPost.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "PostDetail",
    children: () => /*#__PURE__*/React.createElement(_PostDetail.default, children.props)
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "PollTargetSelection",
    component: _PollTargetSelection.default,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "PollPostComposer",
    component: _PollPostComposer.default
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "UserProfile",
    component: _screens.UserProfileScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "EditUser",
    component: _screens.EditUserScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "UserRelationship",
    component: _screens.UserRelationshipScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "BlockedUsers",
    component: _screens.BlockedUsersScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "UserPendingFollowRequests",
    component: _screens.UserPendingFollowRequests
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "StoryTargetSelection",
    component: _TargetSelection.default,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CreateStory",
    component: _CreateStoryScreen.default,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "LivestreamPostTargetSelection",
    component: _LivestreamPostTargetSelection.default,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CreateLivestream",
    component: _CreateLivestream.default,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "LivestreamPlayer",
    component: _LivestreamPlayer.default,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "LivestreamTerminated",
    component: _LivestreamTerminated.default,
    options: {
      animation: 'slide_from_bottom'
    }
  })), /*#__PURE__*/React.createElement(_PostTypeChoiceModal.default, null), /*#__PURE__*/React.createElement(_Toast.default, null)));
}
//# sourceMappingURL=AmityPageRenderer.js.map