import { Label } from "@/components/ui/label" import { Input } from "@/components/ui/input" import { Switch } from "@/components/ui/switch" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { AbandonedCartSettings } from "../../types" import { SettingsSection } from "@/components/ui/settings-section" interface GeneralTabProps { settings: AbandonedCartSettings updateSettings: (updates: Partial) => void } export function GeneralTab({ settings, updateSettings }: GeneralTabProps) { return (
Cart Tracking Configure when a cart is considered abandoned and how long to retain records.
updateSettings({ abandonmentThreshold: parseInt(event.target.value) || 60 })} />

A cart becomes abandoned after this period of inactivity. Minimum 15 minutes.

updateSettings({ cartExpirationDays: parseInt(event.target.value) || 30 })} />

Cart and email-event records are automatically deleted after this period.

Capture the billing email entered by a guest during checkout.

updateSettings({ trackGuestCarts: checked })} />

Remove the cart record after payment. Keep it disabled to retain recovery analytics.

updateSettings({ deleteOnRecovery: checked })} />
) }