import ngModule from '../module';
import Section from 'salix/components/section';

class Controller extends Section {
    set ticket(data) {
        if (!data) return;

        this.data = Object.assign({}, data);
    }

    registerChild(child) {
        this.child = child;
    }

    onStepChange() {
        return this.child.onStepChange();
    }

    onSubmit() {
        this.child.onSubmit();
    }
}

ngModule.vnComponent('vnTicketBasicData', {
    template: require('./index.html'),
    bindings: {
        ticket: '<'
    },
    controller: Controller
});