"use client"; import { ConversionSettings, ObjectPosition } from "@/types"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Checkbox } from "@/components/ui/checkbox"; import { ArrowRightLeft, HelpCircle } from "lucide-react"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { ObjectPositionControl } from "@/components/object-position-control"; const aspectRatios = [ { name: "Custom", value: "custom" }, { name: "1:1 (Square)", value: "1/1" }, { name: "4:3 (Standard)", value: "4/3" }, { name: "3:2 (Photography)", value: "3/2" }, { name: "16:9 (Widescreen)", value: "16/9" }, ]; interface ImageSettingsProps { settings: ConversionSettings; onSettingsChange: (settings: Partial) => void; onAspectRatioChange: (value: string) => void; onSwapDimensions: () => void; } export function ImageSettings({ settings, onSettingsChange, onAspectRatioChange, onSwapDimensions, }: ImageSettingsProps) { return (

Select a preset aspect ratio or 'Custom' to enter dimensions manually.

Set the output width in pixels. Leave empty to use the original width.

{ onSettingsChange({ width: e.target.value, aspectRatio: 'custom' }) }} />

Swap the entered values for width and height.

Set the output height in pixels. Leave empty to use the original height.

{ onSettingsChange({ height: e.target.value, aspectRatio: 'custom' }) }} />
onSettingsChange({ keepOrientation: Boolean(checked) })} />

Determines how the image fits into the new dimensions.

{settings.scaleMode !== 'fill' && (

Sets the anchor point for 'Cover' or 'Contain' scaling.

onSettingsChange({ objectPosition: pos as ObjectPosition })} />
)}
); }