import React, { useRef, useState } from "react";
import { Flex, useColorMode } from "@chakra-ui/core";
import { motion, AnimatePresence } from "framer-motion";
import HyperglassForm from "~/components/HyperglassForm";
import Results from "~/components/Results";
import Header from "~/components/Header";
import Footer from "~/components/Footer";
import Meta from "~/components/Meta";
import useConfig from "~/components/HyperglassProvider";
import Debugger from "~/components/Debugger";
const AnimatedForm = motion.custom(HyperglassForm);
const bg = { light: "white", dark: "black" };
const color = { light: "black", dark: "white" };
const Layout = () => {
const config = useConfig();
const { colorMode } = useColorMode();
const [isSubmitting, setSubmitting] = useState(false);
const [formData, setFormData] = useState({});
const containerRef = useRef(null);
const handleFormReset = () => {
containerRef.current.scrollIntoView({ behavior: "smooth", block: "start" });
setSubmitting(false);
};
return (
<>
{isSubmitting && formData && (
)}
{!isSubmitting && (
)}
{config.developer_mode && }
>
);
};
Layout.displayName = "HyperglassLayout";
export default Layout;