import { TFunction } from "i18next";
import { TSurvey } from "@formbricks/types/surveys/types";
import { getDefaultEndingCard, getDefaultWelcomeCard } from "@/app/lib/survey-builder";

export const getMinimalSurvey = (t: TFunction): TSurvey => ({
  id: "someUniqueId1",
  createdAt: new Date(),
  updatedAt: new Date(),
  name: "Minimal Survey",
  type: "app",
  environmentId: "someEnvId1",
  createdBy: null,
  status: "draft",
  displayOption: "displayOnce",
  autoClose: null,
  triggers: [],
  recontactDays: null,
  displayLimit: null,
  welcomeCard: getDefaultWelcomeCard(t),
  questions: [],
  blocks: [],
  endings: [getDefaultEndingCard([], t)],
  hiddenFields: {
    enabled: false,
  },
  delay: 0, // No delay
  displayPercentage: null,
  autoComplete: null,
  surveyClosedMessage: {
    enabled: false,
  },
  projectOverwrites: null,
  recaptcha: null,
  singleUse: null,
  styling: null,
  segment: null,
  languages: [],
  showLanguageSwitch: false,
  isVerifyEmailEnabled: false,
  isSingleResponsePerEmailEnabled: false,
  variables: [],
  followUps: [],
  isBackButtonHidden: false,
  metadata: {},
  slug: null,
  isCaptureIpEnabled: false,
});
