import { NavigationContainer, NavigationIndependentTree } from '@react-navigation/native';
import * as React from 'react';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import useAuth from '../hooks/useAuth';
import AmitySocialHomePage from '../../social/screens/SocialHomePage';
import PostDetail from '../../social/screens/PostDetail';
import CreatePost from '../../social/screens/CreatePost';
import { UserProfileScreen, EditUserScreen, UserRelationshipScreen, BlockedUsersScreen, UserPendingFollowRequests } from '../../social/screens';
import CreateCommunity from '../../social/screens/CreateCommunity';
import { useTheme } from 'react-native-paper';
import PostTypeChoiceModal from '../../social/components/legacy/PostTypeChoiceModal/PostTypeChoiceModal';
import CreateStoryScreen from '../../social/screens/CreateStory/CreateStoryScreen';
import Toast from '../../social/components/legacy/Toast/Toast';
import AmitySocialGlobalSearchPage from '../../social/screens/SocialGlobalSearch';
import AmityMyCommunitiesSearchPage from '../../social/screens/MyCommunitiesSearch';
import PostTargetSelection from '../../social/screens/PostTargetSelection';
import StoryTargetSelection from '../../social/features/story/TargetSelection/TargetSelection';
import AmityAllCategoriesPage from '../../social/screens/AllCategories';
import AmityCommunitiesByCategoryPage from '../../social/screens/CommunitiesByCategory';
import EditPost from '../../social/screens/EditPost/EditPost';
import AmityExploreComponent from '../../social/features/feed/components/Explore';
import PollPostComposer from '../../social/screens/PollPostComposer';
import CommunityAddCategory from '../../social/screens/CommunityAddCategory';
import CommunityAddMember from '../../social/screens/CommunityAddMember';
import EditCommunity from '../../social/screens/EditCommunity';
import CommunityPostPermission from '../../social/screens/CommunityPostPermission';
import CommunityStorySetting from '../../social/screens/CommunityStorySetting';
import { CommunityNotificationSettingScreen } from '../../social/screens/CommunityNotificationSetting';
import { CommunityPostsNotificationSettingScreen } from '../../social/screens/CommunityPostsNotificationSetting';
import { CommunityCommentsNotificationSettingScreen } from '../../social/screens/CommunityCommentsNotificationSetting';
import { CommunityStoriesNotificationSettingScreen } from '../../social/screens/CommunityStoriesNotificationSetting';
import { CommunityLivestreamsNotificationSettingScreen } from '../../social/screens/CommunityLivestreamsNotificationSetting';
import CommunityPendingRequest from '../../social/screens/CommunityPendingRequest';
import CommunitySetting from '../../social/screens/CommunitySetting';
import AmityCommunityProfilePage from '../../social/screens/CommunityProfile';
import LivestreamTerminated from '../../social/screens/LivestreamTerminated';
import PollTargetSelection from '../../social/screens/PollTargetSelection';
import LivestreamPostTargetSelection from '../../social/screens/LivestreamPostTargetSelection';
import CommunityMembership from '../../social/screens/CommunityMembership';
import CreateLivestream from '../../social/screens/CreateLivestream';
import LivestreamPlayer from '../../social/screens/LivestreamPlayer';
export default function PageRenderer({
  children
}) {
  var _children$type, _children$type2;
  const Stack = createNativeStackNavigator();
  const {
    isConnected
  } = useAuth();
  const theme = useTheme();
  return /*#__PURE__*/React.createElement(NavigationIndependentTree, null, /*#__PURE__*/React.createElement(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: AmitySocialHomePage
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmitySocialGlobalSearchPage",
    component: AmitySocialGlobalSearchPage
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmityMyCommunitiesSearchPage",
    component: AmityMyCommunitiesSearchPage
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AmityExploreComponent",
    component: AmityExploreComponent
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "AllCategoriesPage",
    component: AmityAllCategoriesPage
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunitiesByCategoryPage",
    component: AmityCommunitiesByCategoryPage
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CreateCommunity",
    component: CreateCommunity
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityAddCategory",
    component: CommunityAddCategory
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityAddMember",
    component: CommunityAddMember
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityProfilePage",
    children: () => /*#__PURE__*/React.createElement(AmityCommunityProfilePage, children.props)
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityPendingRequest",
    component: CommunityPendingRequest
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunitySetting",
    component: CommunitySetting
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "EditCommunity",
    component: EditCommunity
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityMembership",
    component: CommunityMembership
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityPostPermission",
    component: CommunityPostPermission
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityStorySetting",
    component: CommunityStorySetting
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityNotificationSetting",
    component: CommunityNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityPostsNotificationSetting",
    component: CommunityPostsNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityCommentsNotificationSetting",
    component: CommunityCommentsNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityStoriesNotificationSetting",
    component: CommunityStoriesNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CommunityLivestreamsNotificationSetting",
    component: CommunityLivestreamsNotificationSettingScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "PostTargetSelection",
    component: PostTargetSelection,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CreatePost",
    component: CreatePost
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "EditPost",
    component: EditPost
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "PostDetail",
    children: () => /*#__PURE__*/React.createElement(PostDetail, children.props)
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "PollTargetSelection",
    component: PollTargetSelection,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "PollPostComposer",
    component: PollPostComposer
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "UserProfile",
    component: UserProfileScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "EditUser",
    component: EditUserScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "UserRelationship",
    component: UserRelationshipScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "BlockedUsers",
    component: BlockedUsersScreen
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "UserPendingFollowRequests",
    component: UserPendingFollowRequests
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "StoryTargetSelection",
    component: StoryTargetSelection,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CreateStory",
    component: CreateStoryScreen,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "LivestreamPostTargetSelection",
    component: LivestreamPostTargetSelection,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "CreateLivestream",
    component: CreateLivestream,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "LivestreamPlayer",
    component: LivestreamPlayer,
    options: {
      animation: 'slide_from_bottom'
    }
  }), /*#__PURE__*/React.createElement(Stack.Screen, {
    name: "LivestreamTerminated",
    component: LivestreamTerminated,
    options: {
      animation: 'slide_from_bottom'
    }
  })), /*#__PURE__*/React.createElement(PostTypeChoiceModal, null), /*#__PURE__*/React.createElement(Toast, null)));
}
//# sourceMappingURL=AmityPageRenderer.js.map