/**
 * select2
 */
import IGDATAPOOLFE from '@dp/ig_datapool_fe.js';

const select2Plugin = {
    initFields(form) {
        this.init(form);
    },
    init(form) {
	let $form = $(form);
	this.form = $form;
	$('select.dp-adv-select.dp-adv-select', $form).each(function() {
	    $(this).select2();
	});
    }
};

IGDATAPOOLFE.addPlugin('select2', select2Plugin);

export default select2Plugin;
