import { SafeAreaView } from 'react-native-safe-area-context';
import { TopBar, FollowingList, FollowerList } from './components';
import { useUserRelationship } from './hooks/useUserRelationship';
import Tabs from '../../../../core/components/Tabs';
import { UserRelationshipTab } from '../../../types';
import { useAmityPage } from '../../../hooks';
import { PageID } from '../../../enums';
export function Relationship({
  userId,
  selectedTab
}) {
  const {
    styles,
    activeTab,
    setActiveTab,
    displayName
  } = useUserRelationship({
    userId,
    selectedTab
  });
  const {
    accessibilityId
  } = useAmityPage({
    pageId: PageID.user_relationship_page
  });
  return /*#__PURE__*/React.createElement(SafeAreaView, {
    testID: accessibilityId,
    style: styles.container,
    edges: ['top']
  }, /*#__PURE__*/React.createElement(TopBar, {
    displayName: displayName
  }), /*#__PURE__*/React.createElement(Tabs, {
    variant: "underline",
    activeTab: activeTab,
    onChangeTab: setActiveTab
  }, /*#__PURE__*/React.createElement(Tabs.List, null, /*#__PURE__*/React.createElement(Tabs.Tab, {
    type: "title",
    value: UserRelationshipTab.following
  }, "Following"), /*#__PURE__*/React.createElement(Tabs.Tab, {
    type: "title",
    value: UserRelationshipTab.follower
  }, "Followers")), /*#__PURE__*/React.createElement(Tabs.Content, {
    value: UserRelationshipTab.following
  }, /*#__PURE__*/React.createElement(FollowingList, {
    userId: userId
  })), /*#__PURE__*/React.createElement(Tabs.Content, {
    value: UserRelationshipTab.follower
  }, /*#__PURE__*/React.createElement(FollowerList, {
    userId: userId
  }))));
}
//# sourceMappingURL=Relationship.js.map