import { cx } from "class-variance-authority" import Image from "next/image" import { Radio } from "react-aria-components" import { PAYMENT_METHOD_ICONS } from "@/constants/booking" import Body from "@/components/TempDesignSystem/Text/Body" import Caption from "@/components/TempDesignSystem/Text/Caption" import styles from "./paymentOption.module.css" import type { PaymentMethodEnum } from "@scandic-hotels/common/constants/paymentMethod" import type { PaymentOptionProps } from "./paymentOption" export default function PaymentOption({ value, label, cardNumber, }: PaymentOptionProps) { return ( cx(styles.paymentOption, { [styles.focused]: isFocusVisible }) } > {({ isSelected }) => ( <>
{label}
{cardNumber ? ( <> {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} •••• {cardNumber} ) : ( {label} )} )}
) }