"use client"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import { Checkbox } from "@/components/ui/checkbox"; import { ObjectPositionControl } from "@/components/object-position-control"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { ArrowRightLeft, HelpCircle } from "lucide-react"; import { useTranslations } from "next-intl"; import { ScaleMode } from "@/hooks/use-image-converter"; interface ImageSettingsProps { aspectRatio: string; onAspectRatioChange: (value: string) => void; width: number | string; onWidthChange: (e: React.ChangeEvent) => void; height: number | string; onHeightChange: (e: React.ChangeEvent) => void; onSwapDimensions: () => void; keepOrientation: boolean; onKeepOrientationChange: (checked: boolean) => void; scaleMode: ScaleMode; onScaleModeChange: (value: ScaleMode) => void; objectPosition: string; onObjectPositionChange: (value: string) => void; } export function ImageSettings({ aspectRatio, onAspectRatioChange, width, onWidthChange, height, onHeightChange, onSwapDimensions, keepOrientation, onKeepOrientationChange, scaleMode, onScaleModeChange, objectPosition, onObjectPositionChange, }: ImageSettingsProps) { const t = useTranslations("ImageConverter"); const aspectRatios = [ { name: t("customAspectRatio"), value: "custom" }, { name: t("squareAspectRatio"), value: "1/1" }, { name: t("standardAspectRatio"), value: "4/3" }, { name: t("photoAspectRatio"), value: "3/2" }, { name: t("widescreenAspectRatio"), value: "16/9" }, ]; return ( <>

{t("aspectRatioTooltip")}

{t("widthTooltip")}

{t("swapDimensionsTooltip")}

{t("heightTooltip")}

onKeepOrientationChange(Boolean(checked))} />

{t("scalingTooltip")}

{scaleMode !== 'fill' && (

{t("positionTooltip")}

)} ); }