import InputError from '@/components/input-error'; import { Button } from '@/components/ui/button'; import { Dialog, DialogContent } from '@/components/ui/dialog'; import { Label } from '@/components/ui/label'; import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'; import { SharedData } from '@/types/global'; import { Link, useForm } from '@inertiajs/react'; import React, { ReactNode, useState } from 'react'; import Layout from './Partials/Layout'; import Message from './Partials/Message'; import StepNavigator from './Partials/StepNavigator'; const Install = ({ flash }: SharedData) => { const [isLoading, setIsLoading] = useState(false); const [showModal, setShowModal] = useState(false); const { data, errors, post, processing, setData } = useForm({ course_creation: 'collaborative', }); const handleConfirm = (e: React.FormEvent) => { e.preventDefault(); setIsLoading(true); setShowModal(true); post(route('install.store-processing'), { onFinish() { setIsLoading(false); setShowModal(false); }, }); }; return (