import { h, VNode } from "preact"; import { useState } from "preact/hooks"; import { useTranslationContext } from "../../context/translation.js"; import { PaytoWireTransferForm } from "./PaytoWireTransferForm.js"; import { WalletWithdrawForm } from "./WalletWithdrawForm.js"; /** * Let the user choose a payment option, * then specify the details trigger the action. */ export function PaymentOptions({ currency }: { currency?: string }): VNode { const { i18n } = useTranslationContext(); const [tab, setTab] = useState<"charge-wallet" | "wire-transfer">( "charge-wallet", ); return (
{tab === "charge-wallet" && (

{i18n.str`Obtain digital cash`}

)} {tab === "wire-transfer" && (

{i18n.str`Transfer to bank account`}

)}
); }