var component =
    {
        extends: BaseDataComponent,
        mixins: [],
        template: '#template-name#',
        data: function () {
            return {
                elements_: [],
                content: '',
                fieldsValues_: [],
                actions_: [],
                container_: 'form',
                css_: '',
            }
        },
        props: [
            'fields_values',
            'actions',
            'container',
            'css',
        ],
        created()
        {
            this.$eventManager().onSubmitFormEvent(this, this.submit, this.cid);
        },
        destroyed()
        {
        
        },
        
        methods: {
            getFormData()
            {
                return (new FormData(this.$refs['form']));
            },
            getFormDataAsObject()
            {
                let formDataObj = {};
                this.getFormData().forEach((value, key) => (formDataObj[key] = value));
                
                return formDataObj;
            },
            submit: function (input)
            {
                if (this.loading_) {
                    return;
                }
                
                if (input instanceof SubmitEvent) {
                    input.preventDefault();
                }
                
                if (this.actions_['onSubmit'])
                {
                    return this.$actionHandler().handle(this.actions_['onSubmit'], this, this.getFormDataAsObject());
                }
                
                this.fetchData(this.ajaxProviderAction_, input)
            },
            onReload: function (data = {}) {
                this.propagateSlotsData_(data.slots ? data.slots : []);
                this.fetchData('reload')
            },
            fetchData: function (action, input = null) {
                this.loadDataFromServer_({
                    formData: this.getFormData(),
                    providerAction: action
                }, this.ajaxData_).then(function () {
                    input && input.resolve ? input.resolve() : null;
                });
            }
        },
    }