import { useState, useRef, useCallback } from "react"; const PEAS_GREEN = "#0B3D2C"; const PEAS_LIGHT = "#E8F5E9"; const PEAS_ACCENT = "#4CAF50"; const PEAS_DARK = "#1a1a1a"; const PEAS_BORDER = "#d0d0d0"; const defaultBooking = { contractorName: "", contractorEntity: "", workerPhone: "", workerEmail: "", companyName: "", bookedBy: "", reportToName: "", reportToEmail: "", reportToPhone: "", jobTitle: "", workingAddress: "", workingHours: "", confirmedDates: "", reservedDates: "", ir35: "", weekdayRateContractor: "", weekdayRateClient: "", satSunRate: "check with Peas agent before engaging in O/T.", satSunRateClient: "check with Peas agent before engaging in O/T.", overtime: "check with Peas agent before engaging in O/T.", overtimeClient: "check with Peas agent before engaging in O/T.", workerPayTerms: "14 days (from Monday eop deadline)", peasAgent: "", timesheetLink: "https://www.peas.london/timesheet", paymentPolicyLink: "https://www.peas.london/payment-policy", invoiceTemplateLink: "https://www.peas.london/invoice-template", }; const sampleBooking = { contractorName: "Lisander Qorri", contractorEntity: "LISANDERQORRI LIMITED & 11849834", workerPhone: "07762 363249 whatsapp call", workerEmail: "lisanderqorri@gmail.com", companyName: "Motus-Creative", bookedBy: "Richard Allen, Director", reportToName: "Richard", reportToEmail: "rich@motus-creative.com, lulu@motus-creative.com", reportToPhone: "", jobTitle: "CGI Artist", workingAddress: "remote", workingHours: "9a, to 6pm UK", confirmedDates: "Project fee commencing Wednesday 11 March 2026 (7-8 Days)", reservedDates: "n/a", ir35: "End client SME", weekdayRateContractor: "300", weekdayRateClient: "360", satSunRate: "check with Peas agent before engaging in O/T.", satSunRateClient: "check with Peas agent before engaging in O/T.", overtime: "check with Peas agent before engaging in O/T.", overtimeClient: "check with Peas agent before engaging in O/T.", workerPayTerms: "14 days (from Monday eop deadline)", peasAgent: "PM/CC", timesheetLink: "https://www.peas.london/timesheet", paymentPolicyLink: "https://www.peas.london/payment-policy", invoiceTemplateLink: "https://www.peas.london/invoice-template", }; /* ── Reusable form field ── */ function Field({ label, name, value, onChange, placeholder, type = "text", half = false }) { return (
{type === "textarea" ? (