import { OptionTypes } from "@components/Widgets/SignupQuestionsWidget/common";

export interface Signup {
  id?: number;
  signupForm_id: number;
  answer: string;
}

// Describes how forms are stored in backend
export interface SignupFormQuestion {
  id: string;
  title_fi: string;
  title_en: string;
  description_fi?: string;
  description_en?: string;
  type: OptionTypes;
  options: {
    enum: string[];
    enumNames_fi: string[];
    enumNames_en: string[];
  };
  required?: boolean;
}
export interface SignupForm {
  id?: number;
  title_fi: string;
  title_en: string;
  visible: boolean;
  isOpen: boolean;
  start_time: string;
  end_time: string;
  email_content: string;
  questions: SignupFormQuestion[];
  signups: string[];
  quota: number;
  schema: {
    title?: string;
    type: string;
    required: string[];
    properties: unknown;
    minProperties?: number;
  };
}
