import AlertKonfirmasi from "@/components/alertKonfirmasi"
import ButtonBackHeader from "@/components/buttonBackHeader"
import { ButtonForm } from "@/components/buttonForm"
import { InputForm } from "@/components/inputForm"
import Styles from "@/constants/Styles"
import { router, Stack, useLocalSearchParams } from "expo-router"
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native"

export default function ProjectCancel() {
   const { id } = useLocalSearchParams()
   return (
      <SafeAreaView>
         <Stack.Screen
            options={{
               headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
               headerTitle: 'Pembatalan Kegiatan',
               headerTitleAlign: 'center',
            }}
         />
         <ScrollView>
            <View style={[Styles.p15, Styles.mb100]}>
               <InputForm label="Alasan Pembatalan" type="default" placeholder="Alasan Pembatalan" required bg="white" />
               <ButtonForm
                  text="SIMPAN"
                  onPress={() => {
                     AlertKonfirmasi({
                        title: 'Konfirmasi',
                        desc: 'Apakah anda yakin ingin membatalkan kegiatan? Pembatalan bersifat permanen',
                        onPress: () => {
                           ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
                           router.push('/project/4324')
                        }
                     })
                  }} />
            </View>
         </ScrollView>
      </SafeAreaView>
   )
}