import { CaseEventTrigger } from '../domain/case-view/case-event-trigger.model';
import { ComplexFieldOverride } from '../components/case-editor/domain/wizard-page-field-complex-override.model';
import { WizardPage, WizardPageField } from '../components/case-editor/domain';
export var createCaseEventTrigger = function (id, name, case_id, show_summary, case_fields, wizard_pages, can_save_draft) {
    if (wizard_pages === void 0) { wizard_pages = []; }
    if (can_save_draft === void 0) { can_save_draft = false; }
    var eventTrigger = new CaseEventTrigger();
    eventTrigger.id = id;
    eventTrigger.name = name;
    eventTrigger.case_id = case_id;
    eventTrigger.show_summary = show_summary;
    eventTrigger.wizard_pages = wizard_pages;
    eventTrigger.event_token = 'test-token';
    eventTrigger.case_fields = case_fields;
    eventTrigger.can_save_draft = can_save_draft;
    return eventTrigger;
};
export var aCaseField = function (id, label, type, display_context, show_summary_content_option, typeComplexFields) {
    if (typeComplexFields === void 0) { typeComplexFields = []; }
    return ({
        id: id || 'personFirstName',
        field_type: {
            id: type.toString() || 'Text',
            type: type || 'Text',
            complex_fields: typeComplexFields || []
        },
        display_context: display_context || 'OPTIONAL',
        label: label || 'First name',
        show_summary_content_option: show_summary_content_option
    });
};
export var createWizardPage = function (id, label, order, wizardPageFields, caseFields, showCondition, parsedShowCondition) {
    if (wizardPageFields === void 0) { wizardPageFields = []; }
    if (caseFields === void 0) { caseFields = []; }
    if (parsedShowCondition === void 0) { parsedShowCondition = null; }
    var wizardPage = new WizardPage();
    wizardPage.id = id;
    wizardPage.label = label;
    wizardPage.order = order;
    wizardPage.wizard_page_fields = wizardPageFields;
    wizardPage.case_fields = caseFields;
    wizardPage.show_condition = showCondition;
    wizardPage.parsedShowCondition = parsedShowCondition;
    return wizardPage;
};
export var createWizardPageField = function (id, order, pageColumnNumber, displayContext, complexFieldOverrides) {
    if (complexFieldOverrides === void 0) { complexFieldOverrides = []; }
    var wizardPageField = new WizardPageField();
    wizardPageField.case_field_id = id;
    wizardPageField.order = order;
    wizardPageField.page_column_no = pageColumnNumber;
    wizardPageField.display_context = displayContext;
    wizardPageField.complex_field_overrides = complexFieldOverrides;
    return wizardPageField;
};
export var createComplexFieldOverride = function (id, order, displayContext, label, hint, showCondition, displayMode, displayModeParams) {
    var complexFieldOverride = new ComplexFieldOverride();
    complexFieldOverride.complex_field_element_id = id;
    complexFieldOverride.order = order;
    complexFieldOverride.display_context = displayContext;
    complexFieldOverride.label = label;
    complexFieldOverride.hint_text = hint;
    complexFieldOverride.show_condition = showCondition;
    complexFieldOverride.display_mode = displayMode;
    complexFieldOverride.display_mode_parameters = displayModeParams;
    return complexFieldOverride;
};
export var createHiddenComplexFieldOverride = function (id) {
    var complexFieldOverride = new ComplexFieldOverride();
    complexFieldOverride.complex_field_element_id = id;
    complexFieldOverride.display_context = 'HIDDEN';
    return complexFieldOverride;
};
export var createCaseField = function (id, label, hint, fieldType, display_context, order, show_condition) {
    if (order === void 0) { order = undefined; }
    if (show_condition === void 0) { show_condition = undefined; }
    return ({
        id: id || 'personFirstName',
        field_type: fieldType || textFieldType(),
        display_context: display_context || 'OPTIONAL',
        label: label || 'First name',
        hint_text: hint || 'First name hint text',
        show_summary_content_option: 0,
        order: order,
        show_condition: show_condition || undefined
    });
};
export var createFieldType = function (typeId, type, complex_fields, collection_field_type) {
    if (complex_fields === void 0) { complex_fields = []; }
    if (collection_field_type === void 0) { collection_field_type = undefined; }
    return {
        id: typeId || 'Text',
        type: type || 'Text',
        complex_fields: complex_fields || [],
        collection_field_type: collection_field_type || undefined
    };
};
export var createFixedListFieldType = function (typeId, fixedListItems) {
    if (fixedListItems === void 0) { fixedListItems = []; }
    return {
        id: 'FixedList-' + typeId,
        type: 'FixedList',
        fixed_list_items: fixedListItems || []
    };
};
export var textFieldType = function () {
    return {
        id: 'Text',
        type: 'Text',
        complex_fields: []
    };
};
//# sourceMappingURL=shared.test.fixture.js.map