import Widget from "./Widget.jsx"; import { Fieldset, NativeSelect, For, Box, Field, Input, Button, Text, Flex } from "@chakra-ui/react"; import { useForm } from "react-hook-form"; import { useState } from "react"; import { Asterisk } from 'lucide-react'; export default function AlertLevel({id, isEditable, isDelete, DeleteWidget}) { const { register, handleSubmit, reset, formState: {errors} } = useForm(); const [isSubmit, setIsSubmit] = useState(false); const onSubmit = (data) => { setIsSubmit(true); reset(); } // Prop Forwarding const widgetProps = { id, isEditable, isDelete, DeleteWidget, isSubmit, setIsSubmit } return ( {!isSubmit ? ( // DISPLAYING INPUT FIElDS AND LABELS Volcano Country {(item) => ( )} ):( // DISPLAYING ALERT LEVEL DATA Alert Level Data Coming Soon. )} ); }