import { Zap, ShieldCheck, AlertCircle } from 'lucide-react'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { isValidNoffer } from '@/lib/types'; interface NofferFieldProps { value: string; onChange: (value: string) => void; } /** * Optional CLINK Offer (noffer1...) input for provider / shop forms. * Self-custodial, Nostr-native static payment code — see https://clinkme.dev. * Purely additive: leaving it blank changes nothing. */ export function NofferField({ value, onChange }: NofferFieldProps) { const trimmed = value.trim(); const showError = trimmed.length > 0 && !isValidNoffer(trimmed); const showValid = isValidNoffer(trimmed); return (
onChange(e.target.value)} spellCheck={false} autoCapitalize="none" className="bg-gray-800 border-gray-700 font-mono text-sm" /> {showError ? (

That doesn't look like a valid noffer1… code.

) : showValid ? (

Valid CLINK code — a "Pay via CLINK" button will show on your profile.

) : (

Paste a self-custodial CLINK payment code (e.g. from ShockWallet / Lightning.Pub) to accept Nostr-native Lightning payments — no web server or custodian.{' '} Learn more

)}
); }