"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Relationship = Relationship;
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
var _components = require("./components");
var _useUserRelationship = require("./hooks/useUserRelationship");
var _Tabs = _interopRequireDefault(require("../../../../core/components/Tabs"));
var _types = require("../../../types");
var _hooks = require("../../../hooks");
var _enums = require("../../../enums");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function Relationship({
  userId,
  selectedTab
}) {
  const {
    styles,
    activeTab,
    setActiveTab,
    displayName
  } = (0, _useUserRelationship.useUserRelationship)({
    userId,
    selectedTab
  });
  const {
    accessibilityId
  } = (0, _hooks.useAmityPage)({
    pageId: _enums.PageID.user_relationship_page
  });
  return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
    testID: accessibilityId,
    style: styles.container,
    edges: ['top']
  }, /*#__PURE__*/React.createElement(_components.TopBar, {
    displayName: displayName
  }), /*#__PURE__*/React.createElement(_Tabs.default, {
    variant: "underline",
    activeTab: activeTab,
    onChangeTab: setActiveTab
  }, /*#__PURE__*/React.createElement(_Tabs.default.List, null, /*#__PURE__*/React.createElement(_Tabs.default.Tab, {
    type: "title",
    value: _types.UserRelationshipTab.following
  }, "Following"), /*#__PURE__*/React.createElement(_Tabs.default.Tab, {
    type: "title",
    value: _types.UserRelationshipTab.follower
  }, "Followers")), /*#__PURE__*/React.createElement(_Tabs.default.Content, {
    value: _types.UserRelationshipTab.following
  }, /*#__PURE__*/React.createElement(_components.FollowingList, {
    userId: userId
  })), /*#__PURE__*/React.createElement(_Tabs.default.Content, {
    value: _types.UserRelationshipTab.follower
  }, /*#__PURE__*/React.createElement(_components.FollowerList, {
    userId: userId
  }))));
}
//# sourceMappingURL=Relationship.js.map