<script type="text/javascript">
    [{include file="../assets/js/list-utils.js"}]
</script>
[{$profiles}]
<script type="text/javascript">
    (function () {
        'use strict';

        window.openImportProfileModal = function() {
            new Ajax.Request('[{isys_application::instance()->container->get('route_generator')->generate('jdisc.sync-profile.popup.import')}]', {
                method:     'get',
                onComplete: function (xhr) {
                    if (!is_json_response(xhr, true)) {
                        return;
                    }

                    const json = xhr.responseJSON;

                    Modal.open(json.data, { maxWidth: 700, maxHeight: 300 });
                }
            });
        }
    })();
</script>
