import React from 'react'; import { useDesignStore } from '../../store/useDesignStore'; import { Square, Circle } from 'lucide-react'; export const GeometryInput: React.FC = () => { const { geometry, setGeometry } = useDesignStore(); const handlePlateShape = (shape: 'rectangular' | 'circular') => { setGeometry({ plateShape: shape }); }; const handleChange = (e: React.ChangeEvent) => { const { name, value } = e.target; // Handle nested updates manually for now or flatten structure if needed // For simplicity, we'll assume flat updates for top-level, but we need to handle nested // This is a quick implementation, ideally we use a helper if (name.startsWith('support.')) { const key = name.split('.')[1]; setGeometry({ support: { ...geometry.support, [key]: parseFloat(value) || 0 } }); } else { // @ts-ignore setGeometry({ [name]: parseFloat(value) || 0 }); } }; return (

Geometry

{/* Plate Type Toggle */}
{/* Column Properties */}

Column Properties

{/* TODO: Add Steel Database Modal Trigger */}
{/* Dimensions */}
{geometry.plateShape === 'rectangular' ? ( <>
in
in
) : (
in
)}
in
in
); };