"use client";
import { useState } from "react";
import { X } from "lucide-react";
import { Placeholder } from "@/components/Placeholder";
export function ProductGallery({ images, alt }: { images: string[]; alt: string }) {
const gallery = images.length ? images : ["/placeholders/product.svg"];
const [active, setActive] = useState(0);
const [lightbox, setLightbox] = useState(false);
const [origin, setOrigin] = useState("50% 50%");
const [zoomed, setZoomed] = useState(false);
const current = gallery[active] ?? gallery[0];
return (
<>
{gallery.length > 1 ? (
{gallery.map((image, index) => (
))}
) : null}
{lightbox ? (
setLightbox(false)}>

event.stopPropagation()}
/>
) : null}
>
);
}