import { QuestionFieldType } from "@boldpenguin/sdk-types";
import { build, fake, oneOf } from "@jackfranklin/test-data-bot";
export class MockQuestion {
    constructor() {
        this.autocomplete = true;
        this.choices = [{ name: 'some', value: 'choice', id: 'choice id' }];
        this.code = 'some code';
        this.created_at = new Date(0);
        this.error_text = 'some error';
        this.field_type = QuestionFieldType.Text;
        this.help_text = 'some help text';
        this.id = 'some question id';
        this.is_active = true;
        this.is_hidden = true;
        this.is_sensitive = true;
        this.min_date = new Date(0);
        this.min_value = 1;
        this.max_date = new Date(1);
        this.max_value = 1;
        this.multiple = true;
        this.order = 1;
        this.placeholder = 'some number';
        this.pattern = 'D+';
        this.question_group_id = 'question group id';
        this.question_set_id = 'question set id';
        this.question_pool_id = null;
        this.reference_type = 'some reference type';
        this.required = true;
        this.text = 'some text';
        this.trackable = true;
        this.updated_at = new Date(0);
    }
}
export class MockAnswer {
    constructor() {
        this.answer_pool_id = 'answer pool id';
        this.answered_by_consumer = false;
        this.answered_by_source = null;
        this.answered_by_user = true;
        this.active = true;
        this.application_form_id = 'form id';
        this.choice_id = 'choice id';
        this.choice_ids = ['choice', 'ids'];
        this.created_at = new Date(0);
        this.display_type = 'public';
        this.errors = {};
        this.id = 'answer id';
        this.is_completed = true;
        this.is_readonly = false;
        this.parent_answer_pool_id = 'parent answer pool id';
        this.question = new MockQuestion();
        this.required = true;
        this.updated_at = new Date(0);
        this.value = 'some value';
        this.version = 0;
    }
}
export const mockQuestionBuilder = build('IQuestion', {
    fields: {
        autocomplete: oneOf(false),
        choices: [],
        code: fake((f) => f.datatype.uuid()),
        created_at: fake((f) => f.date.past()),
        deactivated: oneOf(false),
        error_text: fake((f) => f.random.word()),
        field_type: 'text',
        help_text: fake((f) => f.random.word()),
        id: fake((f) => f.datatype.uuid()),
        is_active: oneOf(true),
        is_hidden: oneOf(false),
        is_sensitive: oneOf(false),
        max_date: '',
        max_value: null,
        min_date: '',
        min_value: null,
        multiple: oneOf(false),
        order: 0,
        pattern: null,
        placeholder: fake((f) => f.random.word()),
        question_group_id: fake((f) => f.datatype.uuid()),
        question_pool_id: null,
        question_set_id: fake((f) => f.datatype.uuid()),
        reference_type: null,
        required: oneOf(true),
        text: fake((f) => f.random.word()),
        trackable: oneOf(false),
        updated_at: fake((f) => f.date.past()),
    },
});
export const mockAnswerBuilder = build('IAnswer', {
    fields: {
        active: oneOf(true),
        answer_pool_id: fake((f) => f.datatype.uuid()),
        answered_by_consumer: oneOf(false),
        answered_by_source: null,
        answered_by_user: oneOf(true),
        application_form_id: fake((f) => f.datatype.uuid()),
        choice_id: null,
        choice_ids: [],
        created_at: fake((f) => f.date.past()),
        display_type: oneOf('public'),
        errors: {},
        id: fake((f) => f.datatype.uuid()),
        is_completed: oneOf(true),
        is_readonly: oneOf(false),
        parent_answer_pool_id: null,
        question: mockQuestionBuilder(),
        required: oneOf(true),
        updated_at: fake((f) => f.date.past()),
        value: fake((f) => f.random.word()),
        version: fake((f) => f.datatype.number()),
    },
});
export const mockQuestion = mockQuestionBuilder();
export const mockAnswer = mockAnswerBuilder();
