import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
import { Badge } from "@/components/ui/badge"
import { RecaptchaState, RecaptchaLocation, recaptchaLocations } from "../../config"
interface LocationsTabProps {
settings: RecaptchaState
toggleLocation: (locationId: RecaptchaLocation) => void
}
export function LocationsTab({ settings, toggleLocation }: LocationsTabProps) {
return (
Protected Pages
Select which pages should be protected by reCAPTCHA
{recaptchaLocations.map((location) => {
const locationKey = location.id as RecaptchaLocation
const isChecked = settings.locations[locationKey] || false
return (
toggleLocation(locationKey)}
className="mt-1"
/>
{location.requiresWooCommerce && (
WooCommerce
)}
{location.description}
)
})}
{/* Help Text */}
How it works
- • reCAPTCHA will be automatically added to the selected forms
- • Failed verifications will block form submission
- • Users will see an error message if verification fails
- • WooCommerce pages require WooCommerce to be installed and active
)
}