import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { SettingsGrid } from "@/components/settings-layout" import { Label } from "@/components/ui/label" import { Switch } from "@/components/ui/switch" import { Globe, AlertTriangle } from "lucide-react" import { GeoSettings } from "../../types" interface AdvancedTabProps { geoSettings: GeoSettings updateGeoSettings: (key: K, value: GeoSettings[K]) => void } export function AdvancedTab({ geoSettings, updateGeoSettings }: AdvancedTabProps) { return ( Geo Targeting Show the cookie notice only to visitors from specific regions
updateGeoSettings('enabled', checked)} />
{geoSettings.enabled && (
{ updateGeoSettings('showOnlyInEU', checked) if (checked) updateGeoSettings('showOnlyInGDPRCountries', false) }} />

EU member states only

{ updateGeoSettings('showOnlyInGDPRCountries', checked) if (checked) updateGeoSettings('showOnlyInEU', false) }} />

Includes EU member states, Iceland, Liechtenstein, Norway, and the United Kingdom

Note: Geo-targeting uses WooCommerce geolocation. Sites whose origin accepts traffic only through Cloudflare can opt in to its headers with the swift_commerce_gdpr_trust_cloudflare_headers filter. Location results may not be 100% accurate. For maximum compliance, consider showing the notice to all visitors.
)}
) }