import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { SettingsGrid } from "@/components/settings-layout" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Switch } from "@/components/ui/switch" import { Slider } from "@/components/ui/slider" import { Clock, MousePointer, Settings } from "lucide-react" import { BehaviorSettings } from "../../types" interface BehaviorTabProps { settings: BehaviorSettings updateSettings: (key: K, value: BehaviorSettings[K]) => void } export function BehaviorTab({ settings, updateSettings }: BehaviorTabProps) { return ( {/* Display Timing */} Display Timing Control when and how the popup appears
{settings.showDelay === 0 ? 'Immediately' : `${settings.showDelay} seconds`}
updateSettings('showDelay', value)} max={10} step={1} />

Delay before showing the popup after page load

updateSettings('autoHide', checked)} />
{settings.autoHide && (
updateSettings('autoHideDelay', parseInt(e.target.value) || 3)} className="w-16" /> seconds
)}
{/* Interaction */} User Interaction Control how users interact with the popup
updateSettings('blockPageScroll', checked)} />

Prevent scrolling until consent is given

updateSettings('closeOnScroll', checked)} />

Not recommended - may not be GDPR compliant

updateSettings('closeOnClickOutside', checked)} />

Allow dismissing by clicking outside

{/* Consent Settings */} Consent Settings Configure consent storage and renewal
updateSettings('cookieExpiry', parseInt(e.target.value) || 365)} />

How long to remember user's consent (max 2 years for GDPR)

updateSettings('policyVersion', e.target.value)} placeholder="1.0" />

Used to track policy updates

updateSettings('respectDoNotTrack', checked)} />

Honor browser's DNT setting

updateSettings('reaskAfterUpdate', checked)} />

Show popup again when policy version changes

updateSettings('reaskAfterDecline', checked)} />

Show popup again after user declines

{settings.reaskAfterDecline && (
updateSettings('reaskAfterDeclineDays', parseInt(e.target.value) || 7)} className="w-24" /> days after user declines
)}
) }