import React, { forwardRef } from "react"; import { CTASectionProps } from "../../types"; import { Button } from "../ui/Button"; // Client Component version - with event handlers export const CTASection = forwardRef( ( { className = "", title = "Ready to Get Started?", subtitle = "Join thousands of developers who are already building amazing applications", buttonText = "Start Building", variant = "primary", onButtonClick, children, ...props }, ref ) => { return (

{title}

{subtitle && (

{subtitle}

)} {onButtonClick && ( )} {children}
); } ); CTASection.displayName = "CTASection"; // Server Component version - no event handlers, link-based navigation export const CTASectionServer = forwardRef< HTMLElement, Omit & { buttonHref?: string; buttonTarget?: "_self" | "_blank"; } >( ( { className = "", title = "Ready to Get Started?", subtitle = "Join thousands of developers who are already building amazing applications", buttonText = "Start Building", variant = "primary", buttonHref, buttonTarget = "_self", children, ...props }, ref ) => { // Explicitly remove onButtonClick if it exists in props (runtime safety) // eslint-disable-next-line @typescript-eslint/no-unused-vars const { onButtonClick: _onButtonClick, ...safeProps } = props as Record< string, unknown >; const buttonClasses = `inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 text-lg px-8 py-3 h-11 ${ variant === "primary" ? "bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm" : variant === "secondary" ? "bg-secondary text-secondary-foreground hover:bg-secondary/80" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground" }`; return (

{title}

{subtitle && (

{subtitle}

)} {buttonHref && ( {buttonText} )} {children}
); } ); CTASectionServer.displayName = "CTASectionServer";