"use strict";
(function ($) {
    $.view_form_vendor = function (element, options) {
        let defaults = {
        };
        let plugin = this;
        plugin.settings = {};
        let $element = $(element);
        plugin.init = function () {
            plugin.settings = $.extend({}, defaults, options);
            $element.find('#vendor-category').DataTable({
                drawCallback: function () {
                    $element.find('input[type="checkbox"]').iCheck({
                        checkboxClass: 'icheckbox_square-red',
                        radioClass: 'iradio_square-red',
                        increaseArea: '10%'
                    });
                }
            });
            $element.find('#vendor-employee').DataTable({
                drawCallback: function () {
                    $element.find('input[type="checkbox"]').iCheck({
                        checkboxClass: 'icheckbox_square-red',
                        radioClass: 'iradio_square-red',
                        increaseArea: '10%'
                    });
                }
            });
            $element.find('#vendor-service').DataTable({
                drawCallback: function () {
                    $element.find('input[type="checkbox"]').iCheck({
                        checkboxClass: 'icheckbox_square-red',
                        radioClass: 'iradio_square-red',
                        increaseArea: '10%'
                    });
                }
            });


        };
        plugin.example_function = function () {
        };
        plugin.init();
    }
    $.fn.view_form_vendor = function (options) {
        return this.each(function () {
            if (undefined === $(this).data('view_form_vendor')) {
                let plugin = new $.view_form_vendor(this, options);
                $(this).data('view_form_vendor'
                    , plugin);
            }
        });
    }
})(jQuery);
