+ {pending.variables.map((def) => {
+ const raw = values[def.name] ?? '';
+ const invalid = raw.trim() === '' && def.defaultValue === undefined;
+ return (
+
+
+
{
+ const next = e.target.value;
+ setValues((prev) => ({ ...prev, [def.name]: next }));
+ }}
+ className={invalid ? 'border-destructive' : undefined}
+ autoFocus={def === pending.variables[0]}
+ />
+ {invalid && (
+
{t('snippets.variables.required')}
+ )}
+