import { useState, FormEvent } from 'react'; import { PRODUCTS } from '../data/menuContent'; import { Product } from '../types'; import { Sparkles, ShoppingBag, Send, ShieldCheck, Tag, Info, BookOpen, CheckCircle } from 'lucide-react'; export default function ProductCatalog({ initialCategory = 'all' }: { initialCategory?: string }) { const [selectedCategory, setSelectedCategory] = useState(initialCategory === 'all' ? 'all' : initialCategory); // Inquiry form states const [showInquiryModal, setShowInquiryModal] = useState(false); const [selectedProduct, setSelectedProduct] = useState(null); const [clientEmail, setClientEmail] = useState(''); const [clientNote, setClientNote] = useState(''); const [formSubmitted, setFormSubmitted] = useState(false); const [formSuccess, setFormSuccess] = useState(false); const categories = ['all', 'Books', 'Podcasts', 'Training', 'Workshop', 'Skin Management & products']; const filteredProducts = selectedCategory === 'all' ? PRODUCTS : PRODUCTS.filter(p => p.category.toLowerCase().startsWith(selectedCategory.toLowerCase().substring(0, 4))); const handleOpenInquiry = (product: Product) => { setSelectedProduct(product); setShowInquiryModal(true); setFormSubmitted(false); setFormSuccess(false); setClientEmail(''); setClientNote(''); }; const handleInquirySubmit = (e: FormEvent) => { e.preventDefault(); if (!clientEmail.trim()) return; setFormSubmitted(true); setTimeout(() => { setFormSuccess(true); setFormSubmitted(false); }, 1200); }; return (
{/* Catalog Header */}
Elite Values-Aligned Store

Publications & Formulations

Acquire specialized printed playbook manuals, premium podcast subscriptions, certified institutional workshop slots, and our organic biocompatible skincare solutions.

{/* Categories Tabs row */}
{categories.map((cat, i) => ( ))}
{/* Grid of Products Card layout */}
{filteredProducts.map(prod => { const isSkin = prod.category.toLowerCase().includes('skin'); const isBook = prod.category.toLowerCase().includes('book'); return (
{prod.category} {isSkin && ( ★ Biocompatible Halal )}

{prod.name}

{prod.price}

{prod.description}

{/* Features & Benefits expandable guides */}
Key Highlights
    {prod.features.map((ft, idx) => (
  • {ft}
  • ))}
Transformative Benefit
    {prod.benefits.map((bf, idx) => (
  • {bf}
  • ))}
); })}
{/* Inquiry Trigger Modal Overlay */} {showInquiryModal && selectedProduct && (
Values Order Gateway
{formSuccess ? (

Inquiry Successfully Registered!

Secure credentials for "{selectedProduct.name}" have been cataloged for client verification.
A stewardship representative will reach out at {clientEmail} within 24 business hours.

) : ( <>

Secure Inquiry: {selectedProduct.name}

Provide your trusted contact coordinates, and our values audit team will verify your license slot / shipping destination.

setClientEmail(e.target.value)} className="w-full text-xs font-semibold rounded border border-stone-200 p-2.5 focus:outline-none focus:ring-1 focus:ring-[#5D1F1F]" />