"use client"; import { cn } from "@/lib/utils"; import Typography, { TypographyProps, } from "@/components/ui/Typography/Typography"; import { Separator } from "@/components/ui/separator"; import { Files } from "lucide-react"; interface CouponProps extends Omit, "title"> { title: TypographyProps<"h3">; offer: { title?: TypographyProps<"h3">; description?: TypographyProps<"p">; }; promoCode?: TypographyProps<"span">; footer?: TypographyProps<"p">; onCopyPromoCode?: (code: string) => void; } function Coupon({ className, title, offer, promoCode, footer, onCopyPromoCode, ...props }: CouponProps) { return (
{title && ( )} {offer && (
{offer.title && ( )} {offer.description && ( )}
)}
{promoCode && (
onCopyPromoCode?.(promoCode.children as string)} >
)} {footer && ( )}
); } export { Coupon };