"use client" import { useState } from "react" import { Button } from "@/components/ui/button" import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Download, Package, Zap, Settings, Blocks, Palette } from "lucide-react" import { exportPackage } from "@/utils/export-packages" import { useColorPalette } from "@/contexts/color-context" import { useDesign } from "@/contexts/design-context" import { useMaterial } from "@/contexts/material-context" export function ExportPackagesButton() { const [isExporting, setIsExporting] = useState(false) const [exportType, setExportType] = useState<"starter" | "full" | null>(null) const { primaryColor } = useColorPalette() const { borderRadius, font } = useDesign() const { selectedMaterial } = useMaterial() const handleExport = async (packageType: "starter" | "full") => { setIsExporting(true) setExportType(packageType) try { const settings = { primaryColor, borderRadius, font, materialType: selectedMaterial?.name.toLowerCase() || "flat", packageType, } await exportPackage(settings) // Show success message setTimeout(() => { setIsExporting(false) setExportType(null) }, 2000) } catch (error) { console.error("Export failed:", error) setIsExporting(false) setExportType(null) } } return ( Export Your Design System Choose the package that best fits your project needs
{/* Starter Kit */}
Starter Kit Free
Essential components & foundation
Foundation (Colors, Typography)
20+ Production-ready Components
Current Customizations Applied
{/* Full Package */}
Full Package Recommended
Complete design system with controls
Everything in Starter Kit
Live Design Controls Interface
Pre-built Page Blocks & Templates
Both packages include all necessary files to run your design system locally.
) }