import React from 'react'
import { Head, router } from '@inertiajs/react'
import { HiOutlineBell } from 'react-icons/hi'
import {
HiChevronRight,
HiClipboardDocumentList,
HiOutlineUserCircle,
} from 'react-icons/hi2'
import { toastSuccess } from '../utils'
import { useModalState } from '@/hooks'
import CustomerLayout from '@/Layouts/CustomerLayout'
import ModalConfirm from '@/Components/ModalConfirm'
import BalanceBanner from '../Index/Partials/BalanceBanner'
export default function Index({
auth: { user },
notification_count,
share_text,
}) {
const confirmModal = useModalState()
const handleLogoutClick = () => {
confirmModal.toggle()
}
const onLogout = () => {
router.post(route('customer.logout'))
}
const handleReferalCopyToClipboard = (code) => {
toastSuccess('copied to clipboard')
const text =
share_text +
'\n' +
route('customer.register', { referral_code: code })
navigator.clipboard.writeText(text)
}
return (