/** * General Settings Tab for Quantity Limits */ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Label } from "@/components/ui/label" import { Switch } from "@/components/ui/switch" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import type { QuantityLimitsSettings } from "../../types" interface GeneralTabProps { settings: QuantityLimitsSettings onChange: (settings: QuantityLimitsSettings) => void } export function GeneralTab({ settings, onChange }: GeneralTabProps) { const updateSetting = ( key: K, value: QuantityLimitsSettings[K] ) => { onChange({ ...settings, [key]: value }) } return (
{/* Display Options */} Display Options Configure how quantity limits are displayed to customers.

Display quantity limit information on product pages.

updateSetting('show_notices', checked)} />

Choose the visual style for quantity limit notices.

{/* Validation Options */} Validation Options Configure how quantity rules are enforced.

Prevent customers from completing checkout if quantity rules are not met.

updateSetting('block_checkout', checked)} />

Count all variations of a product together for max quantity limits.

updateSetting('combine_variations', checked)} />
) }