import React, { useState } from "react";
import { useForm } from "react-hook-form";
import {
DialogHeader,
DialogProps,
Dialog,
DialogContent,
DialogClose,
DialogFooter,
} from "@components/Dialog";
import { Form, TextField } from "@components/form/fields";
import { Alert } from "@components/ui/Alert";
import Button from "@components/ui/Button";
type Props = {
onSubmit: () => void;
};
export const ADD_CALDAV_INTEGRATION_FORM_TITLE = "addCalDav";
export type AddCalDavIntegrationRequest = {
url: string;
username: string;
password: string;
};
export function AddCalDavIntegrationModal(props: DialogProps) {
const form = useForm({
defaultValues: {
url: "",
username: "",
password: "",
},
});
const [errorMessage, setErrorMessage] = useState("");
return (
);
}
/**
* @deprecated
*/
const AddCalDavIntegration = React.forwardRef((props, ref) => {
const onSubmit = (event: any) => {
event.preventDefault();
event.stopPropagation();
props.onSubmit();
};
return (
);
});
AddCalDavIntegration.displayName = "AddCalDavIntegrationForm";
export default AddCalDavIntegration;