const { Button: FBtn, Icon: FIcon, SectionLabel: FLabel, Input, Select, Checkbox, Radio } = window.BeTechnikDesignSystem_72fdfa; const INDUSTRIES = ['Automotive', 'Aerospace', 'Electronics', 'Industrial equipment', 'Consumer products', 'Food & beverage', 'Medical devices', 'Packaging', 'Metal fabrication', 'Plastics', 'Other']; const PTYPES = ['Custom machinery', 'Industrial automation', 'Robotics integration', 'Production optimization', 'Process improvement', 'Retrofit & modernization', 'Special devices & tooling', 'Gauges & calibration', 'Engineering support', 'Not sure yet']; const PCHAL = ['Bottleneck', 'Downtime', 'Manual operations', 'Quality variation', 'Material flow', 'Obsolete equipment', 'Ergonomics', 'New product / variant', 'Other']; const TIMELINE = ['Immediate (0–3 months)', '3–6 months', '6–12 months', 'More than 12 months', 'Exploring options']; const HEARD = ['Search engine', 'LinkedIn', 'Instagram', 'Referral', 'Trade event', 'Existing customer', 'Other']; const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; function useForm(init, required) { const [v, setV] = React.useState(init); const [err, setErr] = React.useState({}); const [state, setState] = React.useState('idle'); const set = k => x => { setV(p => ({ ...p, [k]: x && x.target ? x.target.value : x })); setErr(e => ({ ...e, [k]: undefined })); }; const bind = k => ({ value: v[k] || '', onChange: set(k), error: err[k], name: k, id: 'f-' + k }); const [sendErr, setSendErr] = React.useState(''); const submit = async (e, ref, form, files) => { e.preventDefault(); setSendErr(''); if (v._hp) return; const n = {}; required.forEach(k => { const x = v[k]; if (!x || (Array.isArray(x) && !x.length)) n[k] = 'Required'; }); if (v.email && !EMAIL_RE.test(v.email)) n.email = 'Enter a valid email address'; setErr(n); if (Object.keys(n).length) { const f = document.getElementById('f-' + Object.keys(n)[0]); f && f.focus && f.focus(); return; } setState('sending'); const fd = new FormData(); fd.append('_form', form); fd.append('_page', location.href); Object.entries(v).forEach(([k, x]) => { if (Array.isArray(x)) x.forEach(y => fd.append(k + '[]', y)); else if (x !== undefined && x !== null && x !== '') fd.append(k, x === true ? 'yes' : x); }); (files || []).forEach(file => fd.append('files[]', file, file.name)); try { const r = await fetch('send.php', { method: 'POST', body: fd }); const j = await r.json().catch(() => ({})); if (!r.ok || !j.ok) throw new Error(j.error || 'The message could not be sent.'); setState('done'); setTimeout(() => ref && ref.current && window.scrollTo({ top: ref.current.getBoundingClientRect().top + scrollY - 110, behavior: 'smooth' }), 50); } catch (x) { setState('idle'); setSendErr((x && x.message ? x.message + ' ' : '') + 'If the problem continues, email us at aline@betechnikusa.com.'); } }; return { v, set, bind, err, state, setState, submit, sendErr, reset: () => { setV(init); setState('idle'); setSendErr(''); } }; } function Chips({ options, value = [], onChange, multi = true, id }) { const t = o => onChange(multi ? (value.includes(o) ? value.filter(x => x !== o) : [...value, o]) : [o]); return
Thank you{name ? ', ' + name.split(' ')[0] : ''}. Your information has been received by the Be Technik team.{method ? ` We will reach you by ${method.toLowerCase()}${time ? ' in the ' + time.toLowerCase() : ''}, usually within one business day.` : ''}
{children}For complex engineering projects, we may first schedule a short project discussion to define scope before preparing a formal quotation.
Share drawings, photos and documents through the project discovery form.