'use client'; /** * Offers the shop's saved phrases wherever a message is composed. * * A picker rather than a free-text-only field, because the same handful of * notices get written over and over: choosing one keeps the wording * consistent and — more importantly — reuses a phrase that has already been * translated, instead of paying for a fresh translation of the same sentence. * * The chosen text lands in the field and stays editable. A template is a * starting point, not a constraint. */ export type Template = { id: string; textFr: string }; export default function TemplatePicker({ templates, onPick, disabled = false, label = 'Modèle', }: { templates: Template[]; onPick: (textFr: string) => void; disabled?: boolean; label?: string; }) { if (templates.length === 0) { return null; } return ( ); }