import { useState, useEffect } from 'react' function Field({ label, hint, children }) { return (
{children}
) } const INPUT_CLS = 'w-full bg-gray-900 border border-gray-600 rounded-md px-3 py-1.5 text-sm text-gray-200 placeholder-gray-600 focus:outline-none focus:border-blue-500 font-mono' const TEXTAREA_CLS = INPUT_CLS + ' resize-none' export default function SettingsModal({ isOpen, onClose, settings, onSave }) { const [form, setForm] = useState({ ...settings }) // Sync if parent settings change while modal is closed useEffect(() => { if (!isOpen) setForm({ ...settings }) }, [isOpen, settings]) if (!isOpen) return null function set(key, value) { setForm((f) => ({ ...f, [key]: value })) } function handleSave() { onSave(form) onClose() } function handleBackdropClick(e) { if (e.target === e.currentTarget) onClose() } return (
{/* Modal header */}

Settings

{/* Scrollable body */}
{/* Section: Paths */}

File Paths

set('p2pCoeCsvPath', e.target.value)} /> set('p3pCsvPath', e.target.value)} /> set('refResultDir', e.target.value)} /> set('dutResultDir', e.target.value)} />

{/* Section: Test Exclusion */}

Test Exclusion

set('testExclusion', e.target.value)} />

{/* Section: Holidays */}

Holidays

set('holidays', e.target.value)} />

{/* Section: Schedule */}

Schedule

set('startDateOverride', e.target.value)} />
{/* Footer */}
) }