mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-12 19:30:52 +00:00
26 lines
751 B
TypeScript
26 lines
751 B
TypeScript
//
|
|
// Copyright @ 2024 Hardcore Engineering Inc.
|
|
//
|
|
|
|
import {
|
|
type QuestionInitFunction,
|
|
type QuestionInitFunctionResult,
|
|
type SingleChoiceQuestion
|
|
} from '@hcengineering/questions'
|
|
import { type Hierarchy } from '@hcengineering/core'
|
|
import { translate } from '@hcengineering/platform'
|
|
import type { ThemeOptions } from '@hcengineering/theme'
|
|
import questions from '../plugin'
|
|
|
|
export const SingleChoiceQuestionInit: QuestionInitFunction<SingleChoiceQuestion> = async (
|
|
language: ThemeOptions['language'],
|
|
hierarchy: Hierarchy
|
|
): Promise<QuestionInitFunctionResult<SingleChoiceQuestion>> => {
|
|
return {
|
|
title: await translate(questions.string.SingleChoice, {}, language),
|
|
questionData: {
|
|
options: [{ label: '' }]
|
|
}
|
|
}
|
|
}
|