import React from 'react';
import { PageID } from '../../../enums';
import { useBehaviour } from '../../../providers/BehaviourProvider';
import { useNavigation } from '@react-navigation/native';
import TargetSelectionPage from '../../../components/TargetSelectionPage/TargetSelectionPage';
const AmityStoryTargetSelectionPage = () => {
  const {
    AmityStoryTargetSelectionPageBehavior
  } = useBehaviour();
  const navigation = useNavigation();
  const onSelectFeed = ({
    targetId,
    targetType
  }) => {
    if (AmityStoryTargetSelectionPageBehavior.goToStoryComposerPage) {
      return AmityStoryTargetSelectionPageBehavior.goToStoryComposerPage({
        targetId,
        targetType
      });
    }
    navigation.navigate('CreateStory', {
      targetId,
      targetType
    });
  };
  const onClickClose = () => {
    if (AmityStoryTargetSelectionPageBehavior !== null && AmityStoryTargetSelectionPageBehavior !== void 0 && AmityStoryTargetSelectionPageBehavior.onClickClose) {
      AmityStoryTargetSelectionPageBehavior.onClickClose();
    }
  };
  return /*#__PURE__*/React.createElement(TargetSelectionPage, {
    pageId: PageID.select_story_target_page,
    onSelectFeed: onSelectFeed,
    hideMyTimelineTarget: true,
    onClickClose: onClickClose
  });
};
export default /*#__PURE__*/React.memo(AmityStoryTargetSelectionPage);
//# sourceMappingURL=TargetSelection.js.map