import partsData from '../../data/index.js'; import { formatPrice } from '../../utils/priceFormat'; export default function PowerSupplyStep({ config, updateConfig }) { const selectedPowerSupplyId = config.powerSupply?.id; const selectedMotorId = config.motor?.id; const handleSelect = (powerSupply) => { updateConfig({ powerSupply }); }; // Filter compatible power supplies const compatiblePowerSupplies = partsData.powerSupplies.filter((psu) => { if (!selectedMotorId) return true; return psu.compatibleMotors.includes(selectedMotorId); }); return (
Choose a compatible power supply for your selected motor.
{selectedMotorId && (Showing power supplies compatible with:{' '} {config.motor?.name || 'Selected Motor'}