import ButtonBackHeader from "@/components/buttonBackHeader"
import ButtonSaveHeader from "@/components/buttonSaveHeader"
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 EditDivision() {
   const { id } = useLocalSearchParams()

   return (
      <SafeAreaView>
         <Stack.Screen
            options={{
               headerLeft: () => <ButtonBackHeader onPress={() => { router.back() }} />,
               headerTitle: 'Edit Divisi',
               headerTitleAlign: 'center',
               headerRight: () => <ButtonSaveHeader category="update" onPress={() => {
                  ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
                  router.push('/division/123/info')
               }} />
            }}
         />
         <ScrollView>
            <View style={[Styles.p15, Styles.mb100]}>
               <InputForm label="Nama Divisi" type="default" placeholder="Nama Divisi" required />
               <InputForm label="Deskripsi" type="default" placeholder="Deskripsi Divisi" />
               {/* <ButtonForm
                  text="SIMPAN"
                  onPress={() => {
                     AlertKonfirmasi({
                        title: 'Konfirmasi',
                        desc: 'Apakah anda yakin ingin mengubah data?',
                        onPress: () => {
                           ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
                           router.push('/division/123/info')
                        }
                     })
                  }} /> */}
            </View>
         </ScrollView>
      </SafeAreaView>
   )
}