"use client"; import { useConfiguratorStore } from "@/lib/store"; export function DoorVisualizer() { const { doorType, gridType, finish, handle } = useConfiguratorStore(); // Color mapping based on finish const frameColor = { zwart: "#1A1A1A", brons: "#8B6F47", grijs: "#4A5568", }[finish]; const viewBoxWidth = 400; const viewBoxHeight = 600; const frameThickness = 20; const padding = 40; // Door dimensions within viewBox const doorWidth = viewBoxWidth - padding * 2; const doorHeight = viewBoxHeight - padding * 2; const doorX = padding; const doorY = padding; return (
{/* Background room image with overlay */}
{/* Live Preview Badge */}
Live Voorbeeld
{/* SVG Door */} {/* Outer Frame */} {/* Inner panel (lighter) */} {/* Grid Lines based on gridType */} {gridType === "3-vlak" && ( <> )} {gridType === "4-vlak" && ( <> )} {/* Handle based on doorType */} {doorType === "taats" && handle === "u-greep" && ( )} {doorType === "scharnier" && handle === "klink" && ( <> {/* Handle base */} {/* Handle knob */} )} {doorType === "paneel" && ( <> {/* Central vertical line for paneel */} )} {/* Configuration Info Card */}
Type
{doorType}
Verdeling
{gridType}
Afwerking
{finish}
Greep
{handle}
); }