import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
import { memo } from 'react';
import { useStyles } from './styles';
import { useTheme } from 'react-native-paper';
const CustomSocialTab = ({
  tabNames,
  onTabChange,
  activeTab
}) => {
  const styles = useStyles();
  const theme = useTheme();
  return /*#__PURE__*/React.createElement(View, {
    style: styles.tabContainer
  }, /*#__PURE__*/React.createElement(ScrollView, {
    horizontal: true,
    showsHorizontalScrollIndicator: false
  }, tabNames.map(tabName => {
    const onPressTab = () => {
      onTabChange(tabName);
    };
    const pressedBtnStyle = activeTab === tabName && {
      backgroundColor: theme.colors.primary
    };
    const pressedTabName = activeTab === tabName && {
      color: '#ffffff'
    };
    return /*#__PURE__*/React.createElement(TouchableOpacity, {
      style: [styles.tabBtn, pressedBtnStyle],
      onPress: onPressTab,
      key: tabName
    }, /*#__PURE__*/React.createElement(Text, {
      style: [styles.tabName, pressedTabName]
    }, tabName));
  })));
};
export default /*#__PURE__*/memo(CustomSocialTab);
//# sourceMappingURL=CustomSocialTab.js.map