import React, { useState } from "react"; import { Modal } from "../Modal"; import styles from "./SettingsModal.module.css"; import { TabContainer, TabItem } from "../tabs/Tabs"; import { ReactComponent as AudioIcon } from "../icons/Audio.svg"; import { ReactComponent as VideoIcon } from "../icons/Video.svg"; import { ReactComponent as DeveloperIcon } from "../icons/Developer.svg"; import { SelectInput } from "../input/SelectInput"; import { Item } from "@react-stately/collections"; import { useMediaHandler } from "./useMediaHandler"; import { FieldRow, InputField, ErrorMessage } from "../input/Input"; import { Button } from "../button"; import { useSubmitRageshake } from "./useSubmitRageshake"; import { Subtitle } from "../typography/Typography"; export function SettingsModal({ client, setShowInspector, showInspector, ...rest }) { const { audioInput, audioInputs, setAudioInput, videoInput, videoInputs, setVideoInput, } = useMediaHandler(client); const [description, setDescription] = useState(""); const { submitRageshake, sending, sent, error, downloadDebugLog } = useSubmitRageshake(); return ( Audio } > {audioInputs.map(({ deviceId, label }) => ( {label} ))} Video } > {videoInputs.map(({ deviceId, label }) => ( {label} ))} Developer } > setShowInspector(e.target.checked)} /> Feedback setDescription(e.target.value)} /> {error && ( {error.message} )} ); }