import { Show, type JSX } from "solid-js"
import Modal from "@/components/Modal"
import type { CardPortal, NwcSetup } from "@/lib/usePaymentSetup"
type PaymentSetupShellProps = {
open: boolean
onClose: () => void
title: string
description: string
error?: string
footer: JSX.Element
children: JSX.Element
}
// Shared chrome for the payment-setup dialogs: the modal frame, the
// title/description header with a close button, the error line, and the footer
// container. Each caller supplies the body (children) and footer buttons.
export function PaymentSetupShell(props: PaymentSetupShellProps) {
return (
{props.description} {props.error}{props.title}
Wallet connected!
Automatic payments are now enabled.
} >{props.isUpdate ? "Update or remove your card in the Stripe billing portal. We'll retry any due invoice after you're done." : "Add a payment card via Stripe to enable automatic billing. If an invoice is currently due, we will retry collection after card setup."}