// "use client"; // // import { useState } from "react"; // // import { DateTimePicker } from "@/components/wrappers/common/day-time-picker"; // import { Button } from "@/components/ui/button"; // import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage, useZodForm } from "@/components/ui/form"; // import { Input } from "@/components/ui/input"; // import { RestoreSchema } from "@/components/wrappers/dashboard/database/restore-form.schema"; // import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; // import { ComboBox } from "@/components/wrappers/common/combobox"; // import { Label } from "@/components/ui/label"; // // export type restoreFormProps = { // databaseToRestore: any; // databases: any[]; // backups: any[]; // }; // // export const RestoreForm = (props: restoreFormProps) => { // const { databaseToRestore, databases, backups } = props; // // const backupLocations = [ // { // value: "remote-file", // label: "Remote File", // }, // { // value: "desktop-file", // label: "Desktop File", // }, // ]; // // const executionModes = [ // { // value: "immediate", // label: "Immediate", // }, // { // value: "scheduled", // label: "Scheduled", // }, // ]; // // const [selectedDatabaseId, setSelectedDatabaseId] = useState(databaseToRestore.id); // // const filteredBackups = backups.filter((backup) => backup.databaseId == selectedDatabaseId); // // const defaultValues = { // executionMode: "immediate" as const, // backupLocation: "remote-file" as const, // }; // // const form = useZodForm({ // schema: RestoreSchema, // defaultValues: defaultValues, // }); // // const values = form.getValues(); // // return ( //