"use client"; import type { QrFormProps } from "@/components/qr-forms/types"; import { Checkbox, Field, Select, TextArea, TextInput } from "@/components/ui"; import { FEEDBACK_SCALES } from "@/lib/qr/types/feedback"; export function FeedbackForm({ value, onChange, error, disabled }: QrFormProps) { const title = typeof value.title === "string" ? value.title : ""; const question = typeof value.question === "string" ? value.question : ""; const scale = value.scale === "faces" ? "faces" : "stars"; const allowComment = value.allowComment !== false; const commentLabel = typeof value.commentLabel === "string" ? value.commentLabel : ""; const thankYou = typeof value.thankYou === "string" ? value.thankYou : ""; return (
onChange({ ...value, title: event.target.value })} /> onChange({ ...value, question: event.target.value }) } /> onChange({ ...value, allowComment: event.target.checked }) } label="Zusätzlich einen freien Text zulassen" hint="Sonst gibt es nur die Note — das senkt die Hemmschwelle." /> {allowComment ? ( onChange({ ...value, commentLabel: event.target.value }) } /> ) : null}