+ {/* Active toggle */}
+
+
+ {/* Fields */}
+ {provider.fields.map((field) => {
+ const isPassword = field.type === "password";
+ const visible = visibleFields.has(field.key);
+ const hasValue = !!formValues[field.key];
+ return (
+
+
+
+
onChange(field.key, e.target.value)}
+ placeholder={field.placeholder}
+ className="w-full px-4 py-2.5 rounded-lg border text-sm outline-none transition-colors"
+ style={{
+ borderColor: colors.border,
+ backgroundColor: colors.bg.primary,
+ color: colors.text.primary,
+ paddingRight: isPassword || hasValue ? "5rem" : undefined,
+ }}
+ onFocus={(e) => {
+ e.target.style.borderColor = colors.accent.primary;
+ }}
+ onBlur={(e) => {
+ e.target.style.borderColor = colors.border;
+ }}
+ />
+
+ {hasValue && (
+
+ )}
+ {isPassword && (
+
+ )}
+
+
+
+ );
+ })}
+
+ {/* Last updated */}
+ {existingCredential && (
+
+ Last updated:{" "}
+ {existingCredential.updated_at
+ ? timeAgo(existingCredential.updated_at)
+ : "—"}
+
+ )}
+
+ {/* Actions */}
+
+
+
+ {existingCredential && onDelete && (
+
+ )}
+
+