import NodeCard from './NodeCard';

export default function NodePanel({ meta, weights, params, onWeights, onParams }) {
  return (
    <section className="screener-card">
      <h3>점수 노드 ({meta.length})</h3>
      <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
        {meta.map((m) => (
          <NodeCard
            key={m.name}
            meta={m}
            weight={weights[m.name]}
            params={params[m.name]}
            onWeightChange={(w) => onWeights({ ...weights, [m.name]: w })}
            onParamsChange={(p) => onParams({ ...params, [m.name]: p })}
          />
        ))}
      </div>
    </section>
  );
}
