"use client";
/**
* A single PO Terms & Conditions slot (issue #11) — a combobox: type a one-off
* clause OR pick a catalogued one. Implemented as a native +
* so it stays free-text (custom wording per PO) while suggesting the
* admin-managed clauses for this category, and submits via plain FormData.
*
* `options` are the active clause texts (suggestions). `current` is the PO's
* existing/default value for this slot; it's just the input's initial value, so
* a value not in the catalogue is preserved as-is.
*/
export function TermsField({
field,
options,
current,
className,
}: {
field: string;
options: string[];
current?: string | null;
className?: string;
}) {
const listId = `terms-list-${field}`;
return (
<>
{options.map((o) => (
))}
>
);
}