"use client";
import { Button, Chip, RadioGroup, Radio, Skeleton } from "@heroui/react";
import type { CheckoutAddress } from "@/lib/checkout/types";
type AddressSelectorProps = {
addresses: CheckoutAddress[];
selectedId: string | null;
onSelect: (id: string) => void;
onAddNew: () => void;
isLoading: boolean;
};
export function AddressSelector({
addresses,
selectedId,
onSelect,
onAddNew,
isLoading,
}: AddressSelectorProps) {
if (isLoading) {
return
{address.fullName}
{address.addressLine1}
{address.additionalInformation &&{address.additionalInformation}
}{address.city}
{address.postalCode}
{address.phone}
)}