import { FormlyFieldConfig } from '@ngx-formly/core';
import { StepBaseModel } from '../wizard.basestep.model';

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

    formFields(): FormlyFieldConfig[] {
        return <FormlyFieldConfig[]>[
            {
                key: 'currency',
                type: 'input',
                templateOptions: {
                    type: 'text',
                    label: 'Select currency',
                    placeholder: 'Select currency',
                    required: true
                },
                validation: {
                    messages: {
                        required: 'Please select currency'
                    }
                }
            },
            {
                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'
                    }
                }
            }
        ];
    }
}
