"use client";
import React, { useState } from 'react';
import { MetadataResponse, VariableInfo } from '../types';
import { MetadataCard } from './metadata-card';
import { motion, AnimatePresence } from 'framer-motion';
import { ChevronDown, ChevronUp } from 'lucide-react';
import { Badge } from '@/components/ui/badge';
interface MetadataVariableListProps {
data: MetadataResponse;
}
export function MetadataVariableList({ data }: MetadataVariableListProps) {
return (
{data.variables?.map((variable, index) => (
))}
);
}
function VariableItem({ variable }: { variable: VariableInfo }) {
const [isExpanded, setIsExpanded] = useState(false);
return (
{isExpanded && (
Attributes
{Object.entries(variable.attributes).map(([key, value]) => (
- {key}:
- {String(value)}
))}
Statistics
- Min:
- {variable.min_value ?? 'N/A'}
- Max:
- {variable.max_value ?? 'N/A'}
)}
);
}