// import React, { useState, useEffect, useMemo, useRef } from 'react'; // import { Controller, set, useForm } from 'react-hook-form'; // import HookFormSelect from '@/core/components/elements/Select/HookFormSelect'; // // import ProgressBar from '@ramonak/react-progress-bar'; // import { // Button, // Checkbox, // Spinner, // Tooltip, // UseToastOptions, // } from '@chakra-ui/react'; // import odooApi from '~/libs/odooApi'; // import { toast } from 'react-hot-toast'; // import getFileBase64 from '@/core/utils/getFileBase64'; // import { CheckCircleIcon } from '@heroicons/react/24/outline'; // import InformasiPerusahaan from './InformasiPerusahaan'; // import InformasiVendor from './InformasiVendor'; // import SyaratDagang from './SyaratDagang'; // import Dokumen from './Dokumen'; // import createMerchantApi from '../api/createMerchantApi'; // import useDevice from '@/core/hooks/useDevice'; // import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline'; // import { useRouter } from 'next/router'; // const Konfirmasi = ({ chekValid, buttonSubmitClick }) => { // const { control, watch, setValue, getValues, reset } = useForm(); // const { isDesktop, isMobile } = useDevice(); // const [isOpenInformasi, setIsOpenInformasi] = useState(true); // const [isOpenKontak, setIsOpenKontak] = useState(false); // const [isOpenPengiriman, setIsOpenPengiriman] = useState(false); // const [isOpenKonfirmasi, setIsOpenKonfirmasi] = useState(false); // const formRef = useRef(null); // const router = useRouter(); // const handleDaftarMerchant = () => { // if (formRef.current) { // formRef.current(); // Memicu submit form di InformasiPerusahaan // } // }; // const handleIsError = async (value) => { // if (!value) { // // goToNextStep(); // const toastId = toast.loading('Mengirimkan formulir merchant...'); // const data = { // merchant_request: true, // }; // const create_leads = await createMerchantApi({ data }); // if (create_leads) { // toast.dismiss(toastId); // toast.success('Berhasil medaftarkan merchant'); // reset(); // // router.push('/+'); // } else { // toast.dismiss(toastId); // toast.error('Gagal menambahkan data'); // } // } // reset(); // router.push('/'); // }; // return ( // <> // {isDesktop && ( // <> //
//