// src/toolbar.component.js file import { Ionicons } from "@expo/vector-icons"; import { Camera } from "expo-camera"; import React from "react"; import { StyleSheet, TouchableOpacity, TouchableWithoutFeedback, View, } from "react-native"; const styles = StyleSheet.create({ alignCenter: { flex: 1, alignItems: "center", justifyContent: "center", }, bottomToolbar: { marginTop: "auto", height: 100, display: "flex", justifyContent: "space-evenly", alignItems: "center", flexDirection: "row", }, captureBtn: { width: 60, height: 60, borderWidth: 2, borderRadius: 60, borderColor: "#FFFFFF", }, captureBtnActive: { width: 80, height: 80, }, captureBtnInternal: { width: 76, height: 76, borderWidth: 2, borderRadius: 76, backgroundColor: "red", borderColor: "transparent", }, }); const { FlashMode: CameraFlashModes, Type: CameraTypes } = Camera.Constants; export default function CameraControls({ capturing = false, cameraType = CameraTypes.back, flashMode = CameraFlashModes.off, setFlashMode, setCameraType, onCaptureIn, onCaptureOut, onLongCapture, onShortCapture, }) { return ( setFlashMode( flashMode === CameraFlashModes.on ? CameraFlashModes.off : CameraFlashModes.on ) } > {capturing && } setCameraType( cameraType === CameraTypes.back ? CameraTypes.front : CameraTypes.back ) } > ); }