import { FormlyFieldConfig } from '@ngx-formly/core';

export class StepOneModel {
    title: string = '';
    firstName: string = '';
    lastName: string = '';

    formFields(): FormlyFieldConfig[] {
        return <FormlyFieldConfig[]>[
            {
                key: 'title',
                type: 'input',
                templateOptions: {
                    type: 'text',
                    label: 'Title',
                    placeholder: 'Title',
                    required: true
                },
                validation: {
                    messages: {
                        required: 'sHOULD BE NOT EMPTY'
                    }
                }
            },
            {
                key: 'firstName',
                type: 'input',
                templateOptions: {
                    type: 'text',
                    label: 'First Name',
                    placeholder: 'First Name',
                    required: true
                },
                validation: {
                    messages: {
                        required: 'Should not be empty'
                    }
                }
            },
            {
                key: 'lastName',
                type: 'input',
                templateOptions: {
                    type: 'text',
                    label: 'Last Name',
                    placeholder: 'Last Name',
                    required: true
                },
                validation: {
                    messages: {
                        required: 'Should not be empty'
                    }
                }
            }
        ];
    }
}
