import { useRouter } from "next/router"; import { useState } from "react"; import { useForm } from "react-hook-form"; import { Toaster } from "react-hot-toast"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Alert } from "@calcom/ui/Alert"; import Button from "@calcom/ui/Button"; import { Form, TextField } from "@calcom/ui/form/fields"; export default function Exchange2016CalendarSetup() { const { t } = useLocale(); const router = useRouter(); const form = useForm({ defaultValues: { username: "", password: "", url: process.env.EXCHANGE_DEFAULT_EWS_URL || "", }, }); const [errorMessage, setErrorMessage] = useState(""); return (