import { View } from "react-native";
import LSTScanner from "../../components/LSTScanner";
import ProdScanner from "../../components/ProdScanner";
import { useAppStore } from "../../hooks/useAppStore";

export default function Scanner() {
	const serverPort = useAppStore((s) => s.serverPort);
	return (
		<View
			style={{
				flex: 1,
				//justifyContent: "center",
				alignItems: "center",
				marginTop: 50,
			}}
		>
			{parseInt(serverPort || "0", 10) >= 50000 ? (
				<ProdScanner />
			) : (
				<LSTScanner />
			)}
		</View>
	);
}
