{"version":3,"file":"question.fixture.cjs","sources":["../../../../../src/schema/public/question/question.fixture.ts"],"sourcesContent":["import { keysToCamelCase } from \"zod-to-camel-case\";\n\nimport type {\n  Question,\n  QuestionCamel,\n} from \"@/schema/public/question/question.schema\";\nimport {\n  matchFixture,\n  multipleChoiceFixture,\n  orderFixture,\n  shortAnswerFixture,\n} from \"@/schema/public/components/quizAnswers/quizAnswers.fixture\";\n\nexport const multipleChoiceQuestion = ({\n  overrides = {},\n}: {\n  overrides?: Partial<Question>;\n} = {}): Question => ({\n  question_id: 1,\n  question_uid: \"question-1\",\n  _state: \"published\",\n  question_type: \"multiple-choice\",\n  question_stem: [\n    {\n      text: \"What is the capital of France?\",\n      type: \"text\",\n    },\n  ],\n  answers: {\n    \"multiple-choice\": [\n      multipleChoiceFixture({ overrides: { answer_is_correct: true } }),\n      multipleChoiceFixture({ overrides: { answer_is_correct: false } }),\n      multipleChoiceFixture({ overrides: { answer_is_correct: false } }),\n      multipleChoiceFixture({ overrides: { answer_is_correct: false } }),\n    ],\n  },\n  feedback: \"Paris is the capital of France.\",\n  hint: \"Think about the Eiffel Tower.\",\n  active: true,\n  order: 1,\n  ...overrides,\n});\n\nexport const shortAnswerQuestion = ({\n  overrides = {},\n}: {\n  overrides?: Partial<Question>;\n} = {}): Question => ({\n  question_id: 2,\n  question_uid: \"question-2\",\n  _state: \"published\",\n  question_type: \"short-answer\",\n  question_stem: [\n    {\n      text: \"What is the capital of France?\",\n      type: \"text\",\n    },\n  ],\n  answers: {\n    \"short-answer\": [shortAnswerFixture()],\n  },\n  feedback: \"Paris is the capital of France.\",\n  hint: \"Think about the Eiffel Tower.\",\n  active: true,\n  order: 2,\n  ...overrides,\n});\n\nexport const orderQuestion = ({\n  overrides = {},\n}: {\n  overrides?: Partial<Question>;\n} = {}): Question => ({\n  question_id: 3,\n  question_uid: \"question-3\",\n  _state: \"published\",\n  question_type: \"order\",\n  question_stem: [\n    {\n      text: \"What is the capital of France?\",\n      type: \"text\",\n    },\n  ],\n  answers: {\n    order: [\n      orderFixture({ overrides: { correct_order: 1 } }),\n      orderFixture({ overrides: { correct_order: 2 } }),\n      orderFixture({ overrides: { correct_order: 3 } }),\n      orderFixture({ overrides: { correct_order: 4 } }),\n    ],\n  },\n  feedback: \"Paris is the capital of France.\",\n  hint: \"Think about the Eiffel Tower.\",\n  active: true,\n  order: 3,\n  ...overrides,\n});\n\nexport const matchQuestion = ({\n  overrides = {},\n}: {\n  overrides?: Partial<Question>;\n} = {}): Question => ({\n  question_id: 4,\n  question_uid: \"question-4\",\n  _state: \"published\",\n  question_type: \"match\",\n  question_stem: [\n    {\n      text: \"What is the capital of France?\",\n      type: \"text\",\n    },\n  ],\n  answers: {\n    match: [matchFixture(), matchFixture(), matchFixture(), matchFixture()],\n  },\n  feedback: \"Paris is the capital of France.\",\n  hint: \"Think about the Eiffel Tower.\",\n  active: true,\n  order: 4,\n  ...overrides,\n});\n\nexport const multipleChoiceQuestionCamel = ({\n  overrides = {},\n}: {\n  overrides?: Partial<QuestionCamel>;\n} = {}): QuestionCamel => ({\n  ...keysToCamelCase(multipleChoiceQuestion()),\n  ...overrides,\n});\n\nexport const shortAnswerQuestionCamel = ({\n  overrides = {},\n}: {\n  overrides?: Partial<QuestionCamel>;\n} = {}): QuestionCamel => ({\n  ...keysToCamelCase(shortAnswerQuestion()),\n  ...overrides,\n});\n\nexport const orderQuestionCamel = ({\n  overrides = {},\n}: {\n  overrides?: Partial<QuestionCamel>;\n} = {}): QuestionCamel => ({\n  ...keysToCamelCase(orderQuestion()),\n  ...overrides,\n});\n\nexport const matchQuestionCamel = ({\n  overrides = {},\n}: {\n  overrides?: Partial<QuestionCamel>;\n} = {}): QuestionCamel => ({\n  ...keysToCamelCase(matchQuestion()),\n  ...overrides,\n});\n"],"names":["multipleChoiceQuestion","overrides","question_id","question_uid","_state","question_type","question_stem","text","type","answers","multipleChoiceFixture","answer_is_correct","feedback","hint","active","order","shortAnswerQuestion","shortAnswerFixture","orderQuestion","orderFixture","correct_order","matchQuestion","match","matchFixture","keysToCamelCase"],"mappings":"+GAaO,MAAMA,EAAyB,EACpCC,YAAY,CAAA,GAGV,CAAA,KAAE,CACJC,YAAa,EACbC,aAAc,aACdC,OAAQ,YACRC,cAAe,kBACfC,cAAe,CACb,CACEC,KAAM,iCACNC,KAAM,SAGVC,QAAS,CACP,kBAAmB,CACjBC,EAAAA,sBAAsB,CAAET,UAAW,CAAEU,mBAAmB,KACxDD,EAAAA,sBAAsB,CAAET,UAAW,CAAEU,mBAAmB,KACxDD,EAAAA,sBAAsB,CAAET,UAAW,CAAEU,mBAAmB,KACxDD,EAAAA,sBAAsB,CAAET,UAAW,CAAEU,mBAAmB,OAG5DC,SAAU,kCACVC,KAAM,gCACNC,QAAQ,EACRC,MAAO,KACJd,IAGQe,EAAsB,EACjCf,YAAY,CAAA,GAGV,CAAA,KAAE,CACJC,YAAa,EACbC,aAAc,aACdC,OAAQ,YACRC,cAAe,eACfC,cAAe,CACb,CACEC,KAAM,iCACNC,KAAM,SAGVC,QAAS,CACP,eAAgB,CAACQ,EAAAA,uBAEnBL,SAAU,kCACVC,KAAM,gCACNC,QAAQ,EACRC,MAAO,KACJd,IAGQiB,EAAgB,EAC3BjB,YAAY,CAAA,GAGV,CAAA,KAAE,CACJC,YAAa,EACbC,aAAc,aACdC,OAAQ,YACRC,cAAe,QACfC,cAAe,CACb,CACEC,KAAM,iCACNC,KAAM,SAGVC,QAAS,CACPM,MAAO,CACLI,EAAAA,aAAa,CAAElB,UAAW,CAAEmB,cAAe,KAC3CD,EAAAA,aAAa,CAAElB,UAAW,CAAEmB,cAAe,KAC3CD,EAAAA,aAAa,CAAElB,UAAW,CAAEmB,cAAe,KAC3CD,EAAAA,aAAa,CAAElB,UAAW,CAAEmB,cAAe,OAG/CR,SAAU,kCACVC,KAAM,gCACNC,QAAQ,EACRC,MAAO,KACJd,IAGQoB,EAAgB,EAC3BpB,YAAY,CAAA,GAGV,CAAA,KAAE,CACJC,YAAa,EACbC,a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