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 EditProject() {
   const { id } = useLocalSearchParams()
   return (
      <SafeAreaView>
      <Stack.Screen
         options={{
            headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
            headerTitle: 'Edit Judul Kegiatan',
            headerTitleAlign: 'center',
         }}
      />
      <ScrollView>
         <View style={[Styles.p15, Styles.mb100]}>
            <InputForm label="Judul Kegiatan" type="default" placeholder="Judul Kegiatan" required bg="white" />
            <ButtonForm
               text="SIMPAN"
               onPress={() => {
                  AlertKonfirmasi({
                     title: 'Konfirmasi',
                     desc: 'Apakah anda yakin ingin mengubah data?',
                     onPress: () => {
                        ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
                        router.push('/project/4324')
                     }
                  })
               }} />
         </View>
      </ScrollView>
   </SafeAreaView>
   )
}