import { AlertDefaultSystem, ButtonCustom, Grid } from "@/components";
import { router } from "expo-router";
import { View } from "react-native";
export default function Job_ButtonStatusSection({
status,
}: {
status: string;
}) {
const handleBatalkanReview = () => {
AlertDefaultSystem({
title: "Batalkan Review",
message: "Apakah Anda yakin ingin batalkan review ini?",
textLeft: "Batal",
textRight: "Ya",
onPressRight: () => {
console.log("Hapus");
router.back();
},
});
};
const handleAjukanReview = () => {
AlertDefaultSystem({
title: "Ajukan Review",
message: "Apakah Anda yakin ingin ajukan review ini?",
textLeft: "Batal",
textRight: "Ya",
onPressRight: () => {
console.log("Hapus");
router.back();
},
});
};
const handleEditKembali = () => {
AlertDefaultSystem({
title: "Edit Kembali",
message: "Apakah Anda yakin ingin edit kembali ini?",
textLeft: "Batal",
textRight: "Ya",
onPressRight: () => {
console.log("Hapus");
router.back();
},
});
};
const handleOpenDeleteAlert = () => {
AlertDefaultSystem({
title: "Hapus",
message: "Apakah Anda yakin ingin menghapus data ini?",
textLeft: "Batal",
textRight: "Hapus",
onPressRight: () => {
console.log("Hapus");
router.back();
},
});
};
const DeleteButton = () => {
return (
<>
Hapus
>
);
};
switch (status) {
case "publish":
return (
<>
{
console.log("Arsipkan");
router.replace("/(application)/(user)/job/(tabs)/archive");
}}
>
Arsipkan
>
);
case "review":
return (
Batalkan Review
);
case "draft":
return (
<>
Ajukan Review
{DeleteButton()}
>
);
case "reject":
return (
<>
Edit Kembali
{DeleteButton()}
>
);
default:
return Status Undifined;
}
}