"use strict";
(function ($) {
    $.view_list_currencies = function (element, options) {
        let defaults = {

        };
        let plugin = this;
        plugin.settings = {}
        let $element = $(element);
        plugin.init = function () {
            plugin.settings = $.extend({}, defaults, options);
            $element.find('#example').DataTable({

            });
            $element.find('input[type="checkbox"]').iCheck({
                checkboxClass: 'icheckbox_square-red',
                radioClass: 'iradio_square-red',
                increaseArea: '10%'
            });
            $element.find('.btn-show-modal').on('click', function () {

                $element.find('#myModal').modal('show');
                $element.find('#myModal').addClass('active');
            })
            $element.find('.btn-close-currency').on('click',function (e) {
                $('.modal-backdrop').remove();
                $element.find('#myModal').removeClass('active');
            })
            $element.find('.close-x').on('click',function (e) {
                $('.modal-backdrop').remove();
                $element.find('#myModal').removeClass('active');
            })
        }
        plugin.example_function = function () {
        }
        plugin.init();
    }
    $.fn.view_list_currencies = function (options) {
        return this.each(function () {
            if (undefined == $(this).data('view_list_currencies')) {
                let plugin = new $.view_list_currencies(this, options);
                $(this).data('view_list_currencies', plugin);
            }
        });
    }
})(jQuery);
