"use client"; import * as React from "react"; import { Input } from "../../ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "../../ui/select"; import { useMessages } from "../../context"; import { StatementField } from "../StatementField"; import { MAX_COUNT } from "../statementForm"; import type { StatementFormController } from "../formController"; import { FIELD_GRID } from "./layout"; /** Who issues the statement: its name, what kind of body it is, and the two * headcounts the AgID model asks of a public administration. */ export function OrganizationSection({ controller, }: { controller: StatementFormController; }) { const messages = useMessages(); const fields = messages.statement.form.fields; const { form, patch, patchCount, fieldError, readOnly } = controller; return (
) => patch("orgName", e.target.value) } placeholder={fields.orgNamePlaceholder} disabled={readOnly} /> {/* Shown to everyone, required only of a public administration: the AgID model asks an administration for both numbers, and a blank pair would drop the whole "Informazioni sulla struttura" section from its document without ever saying so. A private entity may declare them and the renderer drops whichever it left blank, so there is nothing to block it on. */} ) => patchCount("employeesWithDisabilities", e.target.value) } disabled={readOnly} /> ) => patchCount("workstationsForDisabilities", e.target.value) } disabled={readOnly} />
); }