<%! import json %>
<%! from django.utils.translation import ugettext as _ %>
<%! from student.models import anonymous_id_for_user %>
<%
    if user:
        params.update({'user': anonymous_id_for_user(user, None)})
%>
<div id="edx-notes-wrapper-${uid}" class="edx-notes-wrapper">
    <div class="edx-notes-wrapper-content">${content}</div>
</div>
<script type="text/javascript">
    (function (require) {
        require(['js/edxnotes/views/visibility_decorator'], function(EdxnotesVisibilityDecorator) {
            var element = document.getElementById('edx-notes-wrapper-${uid}');
            EdxnotesVisibilityDecorator.factory(element, ${json.dumps(params)}, ${edxnotes_visibility});
        });
    }).call(this, require || RequireJS.require);
</script>
