import React from 'react'
import { useProductStore } from '../store/Store'
import { useSharedStore } from '@/share/store/sharedStore'
import OnlineCart from './OnlineCart'
import OfflineCart from './OfflineCart'

const Cart = () => {
    const { variantId } = useProductStore()
    const { isLogin } = useSharedStore()

    return (
        <div>
            {isLogin ? (
                <OnlineCart variantId={variantId} />
            ) : (
                <OfflineCart variantId={variantId} />
            )}
        </div>
    )
}

export default Cart