define([
    'jquery'
], function ($) {
    'use strict';

    //creating jquery widget
    $.widget('filoblu.exporter', {
        options: {
            controllerUrl: '',
        },
        _create: function () {
            const exporterButton = $(this.element.children('.exporter-button'));
            const controllerUrl = this.options.controllerUrl;

            exporterButton.on('click', function() {
                $('body').trigger('processStart');
                setLocation(controllerUrl);
            })
        }


    });

    return $.filoblu.exporter;
});
