import SignOutButton from "@/components-old/sign-out-button/sign-out-button.component";
import { selectBodyshop } from "@/redux/user/user.selectors";
import { StyleSheet, Text, View } from "react-native";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";

const mapStateToProps = createStructuredSelector({
  bodyshop: selectBodyshop,
});

export default connect(mapStateToProps, null)(Tab);

function Tab({ bodyshop }) {
  return (
    <View style={styles.container}>
      <Text>Tab [Home|Settings]</Text>
      <Text>
        Using Local Media Server? {bodyshop?.uselocalmediaserver ? "Yes" : "No"}
      </Text>
      <SignOutButton />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center",
  },
});
