import { BackHandler } from 'react-native';
import { AmityPageRenderer, AmityUiKitProvider, AmityUiKitSocial, ErrorBoundary, navigate } from './core';
import { AmityStoryTabComponent, AmityCreateStoryPage, AmityDraftStoryPage, AmityViewStoryPage, AmitySocialHomePage, AmitySocialHomeTopNavigationComponent, AmityCommunitySearchResultComponent, AmitySocialGlobalSearchPage, AmityTopSearchBarComponent, AmityEmptyNewsFeedComponent, AmityGlobalFeedComponent, AmityMyCommunitiesComponent, AmityNewsFeedComponent, AmityPostContentComponent, AmityPostDetailPage, AmityPostTargetSelectionPageType, AmityCreatePostMenuComponent, AmityDetailedMediaAttachmentComponent, AmityMediaAttachmentComponent, AmityPostCommentComponent, AmityPostComposerPage, AmityPostEngagementActionsComponent, AmityPostTargetSelectionPage, AmityReactionListComponent, AmityStoryTargetSelectionPage, AmityUserSearchResultComponent, AmityMyCommunitiesSearchPage, AmityExploreComponent, AmityAllCategoriesPage, AmityCommunitiesByCategoryPage, AmityCommunityProfilePage as CommunityProfilePage, AmityCreateLivestreamPage, AmityLivestreamPostTargetSelectionPage, AmityLivestreamTerminatedPage, AmityLivestreamPlayerPage, AmityPollTargetSelectionPage, AmityPollPostComposerPage, AmityCommunityFeedComponent, AmityCommunityHeaderComponent, AmityCommunityImageFeedComponent, AmityCommunityVideoFeedComponent, AmityThumbnailActionComponent, AmityPostEngagementContentComponent, AmityPostTargetType, AmityCommunitySetupPage, AmityCommunityAddCategoryPage, AmityCommunityAddMemberPage, AmityCommunityPendingRequestPage, AmityCommunitySettingPage, AmityCommunityMembershipPage, AmityCommunityPostPermissionPage, AmityCommunityStorySettingPage, AmityCommunityNotificationSettingPage, AmityCommunityPostsNotificationSettingPage, AmityCommunityCommentsNotificationSettingPage, AmityCommunityStoriesNotificationSettingPage, AmityCommunityLivestreamsNotificationSettingPage, AmityCommunityPinnedPostComponent, AmityPendingPostListComponent, AmityGlobalStoryTabWrapper, AmityPostComposerMode, AmityStoryTabComponentEnum, mediaAttachment, PostDetail, AmityUserProfilePage, AmityEditUserProfilePage, AmityUserRelationshipPage, AmityBlockedUsersPage } from './social';

// Polyfill for BackHandler compatibility with older libraries like react-native-modalbox
// In React Native 0.65+, BackHandler.removeEventListener was removed
// This polyfill maintains backward compatibility
if (!BackHandler.removeEventListener) {
  const listeners = new Map();
  const originalAddEventListener = BackHandler.addEventListener;
  BackHandler.addEventListener = (eventName, handler) => {
    const subscription = originalAddEventListener(eventName, handler);
    listeners.set(handler, subscription);
    return subscription;
  };
  BackHandler.removeEventListener = (_eventName, handler) => {
    const subscription = listeners.get(handler);
    if (subscription) {
      subscription.remove();
      listeners.delete(handler);
    }
  };
}
export { AmityUiKitProvider, ErrorBoundary, AmityUiKitSocial, AmityStoryTabComponent, AmityStoryTabComponentEnum, AmityCreateStoryPage, AmityDraftStoryPage, AmityViewStoryPage, AmitySocialHomePage, AmitySocialHomeTopNavigationComponent, AmityCommunitySearchResultComponent, AmitySocialGlobalSearchPage, AmityTopSearchBarComponent, AmityEmptyNewsFeedComponent, AmityGlobalFeedComponent, AmityMyCommunitiesComponent, AmityNewsFeedComponent, AmityPostContentComponent, AmityPostDetailPage, AmityPostTargetSelectionPageType, AmityCreatePostMenuComponent, AmityDetailedMediaAttachmentComponent, AmityMediaAttachmentComponent, AmityPostCommentComponent, AmityPostComposerPage, AmityPostEngagementActionsComponent, AmityPostTargetSelectionPage, AmityReactionListComponent, AmityStoryTargetSelectionPage, AmityUserSearchResultComponent, AmityMyCommunitiesSearchPage, AmityPostComposerMode, mediaAttachment, AmityExploreComponent, AmityPageRenderer, PostDetail, AmityUserProfilePage, AmityEditUserProfilePage, AmityUserRelationshipPage, AmityBlockedUsersPage, AmityAllCategoriesPage, AmityCommunitiesByCategoryPage, CommunityProfilePage, AmityCreateLivestreamPage, AmityLivestreamPostTargetSelectionPage, AmityLivestreamTerminatedPage, AmityLivestreamPlayerPage, AmityPollTargetSelectionPage, AmityPollPostComposerPage, AmityCommunityFeedComponent, AmityCommunityHeaderComponent, AmityCommunityImageFeedComponent, AmityCommunityVideoFeedComponent, AmityThumbnailActionComponent, AmityPostEngagementContentComponent, AmityPostTargetType, AmityCommunitySetupPage, AmityCommunityAddCategoryPage, AmityCommunityAddMemberPage, AmityCommunityPendingRequestPage, AmityCommunitySettingPage, AmityCommunityMembershipPage, AmityCommunityPostPermissionPage, AmityCommunityStorySettingPage, AmityCommunityNotificationSettingPage, AmityCommunityPostsNotificationSettingPage, AmityCommunityCommentsNotificationSettingPage, AmityCommunityStoriesNotificationSettingPage, AmityCommunityLivestreamsNotificationSettingPage, AmityCommunityPinnedPostComponent, AmityPendingPostListComponent, AmityGlobalStoryTabWrapper, navigate };
//# sourceMappingURL=index.js.map