import { useState } from "react"; import { useFileStore } from "@/stores/file-store"; import { useToolProcessor } from "@/hooks/use-tool-processor"; import { Download } from "lucide-react"; import { ProgressCard } from "@/components/common/progress-card"; export function TextOverlaySettings() { const { files } = useFileStore(); const { processFiles, processing, error, downloadUrl, originalSize, processedSize, progress } = useToolProcessor("text-overlay"); const [text, setText] = useState("Your Text Here"); const [fontSize, setFontSize] = useState(48); const [color, setColor] = useState("#FFFFFF"); const [position, setPosition] = useState<"top" | "center" | "bottom">("bottom"); const [backgroundBox, setBackgroundBox] = useState(false); const [backgroundColor, setBackgroundColor] = useState("#000000"); const [shadow, setShadow] = useState(true); const handleProcess = () => { processFiles(files, { text, fontSize, color, position, backgroundBox, backgroundColor, shadow }); }; const hasFile = files.length > 0; return (
{error}
} {originalSize != null && processedSize != null && (Original: {(originalSize / 1024).toFixed(1)} KB
Processed: {(processedSize / 1024).toFixed(1)} KB