import { Answer, Question } from './question' import { RatingProps } from './rating' import { WithMongooseProps } from './with-mongoose-props' import { WithTenantProps } from './with-tenant-props' export type AnswerResponse = { rating: number closedAnswer: Array openAnswer: string } export type FeedBackProps = RatingProps & { question: string questions: Question[] | [] buttons: { next: string previous: string } loadingMessage: string successMessage: string errorMessage: string maxCharactersMessage?: string isLoading?: boolean hasError?: boolean onSend: (value: AnswerResponse) => void openAnswerPlaceholder: string } export type SendAnswer = { id: string answer: Array } export type Feedback = WithMongooseProps< WithTenantProps< AnswerResponse & { pageUrl: string } > >