/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: JspC/ApacheTomcat9
 * Generated at: 2026-03-17 12:51:45 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp.tag.web.silverpeas.gallery;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class albumListHeader_tag
    extends javax.servlet.jsp.tagext.SimpleTagSupport
    implements org.apache.jasper.runtime.JspSourceDependent,
                 org.apache.jasper.runtime.JspSourceImports {

private static org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_0;

static {
  _jspx_fnmap_0= org.apache.jasper.runtime.ProtectedFunctionMapper.getInstance();
  _jspx_fnmap_0.mapFunction("silfn:formatPaginationFromFirstIndexOfItem", org.silverpeas.core.web.util.viewgenerator.html.pagination.PaginationUtil.class, "formatFromFirstIndexOfItem", new Class[] {int.class, int.class, int.class});
  _jspx_fnmap_0.mapFunction("fn:length", org.apache.taglibs.standard.functions.Functions.class, "length", new Class[] {java.lang.Object.class});
}

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  static {
    _jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(8);
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/glassfish/web/javax.servlet.jsp.jstl/1.2.5/javax.servlet.jsp.jstl-1.2.5.jar!/META-INF/fn.tld", Long.valueOf(1531470420000L));
    _jspx_dependants.put("file:/home/silverbuild/.m2/repository/org/glassfish/web/javax.servlet.jsp.jstl/1.2.5/javax.servlet.jsp.jstl-1.2.5.jar", Long.valueOf(1773748474791L));
    _jspx_dependants.put("/WEB-INF/tags/silverpeas/gallery/albumListDisplaySelector.tag", Long.valueOf(1725461247856L));
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/glassfish/web/javax.servlet.jsp.jstl/1.2.5/javax.servlet.jsp.jstl-1.2.5.jar!/META-INF/c.tld", Long.valueOf(1531470420000L));
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/silverpeas/core/silverpeas-core-web/6.4.7-build260317/silverpeas-core-web-6.4.7-build260317.jar!/META-INF/silverFunctions.tld", Long.valueOf(1773748476000L));
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/glassfish/web/javax.servlet.jsp.jstl/1.2.5/javax.servlet.jsp.jstl-1.2.5.jar!/META-INF/fmt.tld", Long.valueOf(1531470420000L));
    _jspx_dependants.put("file:/home/silverbuild/.m2/repository/org/silverpeas/core/silverpeas-core-web/6.4.7-build260317/silverpeas-core-web-6.4.7-build260317.jar", Long.valueOf(1773748501033L));
    _jspx_dependants.put("jar:file:/home/silverbuild/.m2/repository/org/silverpeas/core/silverpeas-core-web/6.4.7-build260317/silverpeas-core-web-6.4.7-build260317.jar!/META-INF/viewGenerator.tld", Long.valueOf(1773748476000L));
  }

  private static final java.util.Set<java.lang.String> _jspx_imports_packages;

  private static final java.util.Set<java.lang.String> _jspx_imports_classes;

  static {
    _jspx_imports_packages = new java.util.LinkedHashSet<>(4);
    _jspx_imports_packages.add("javax.servlet");
    _jspx_imports_packages.add("javax.servlet.http");
    _jspx_imports_packages.add("javax.servlet.jsp");
    _jspx_imports_classes = null;
  }

  private javax.servlet.jsp.JspContext jspContext;
  private java.io.Writer _jspx_sout;
  private volatile javax.el.ExpressionFactory _el_expressionfactory;
  private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public void setJspContext(javax.servlet.jsp.JspContext ctx) {
    super.setJspContext(ctx);
    java.util.ArrayList _jspx_nested = null;
    java.util.ArrayList _jspx_at_begin = null;
    java.util.ArrayList _jspx_at_end = null;
    this.jspContext = new org.apache.jasper.runtime.JspContextWrapper(this, ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, null);
  }

  public javax.servlet.jsp.JspContext getJspContext() {
    return this.jspContext;
  }
  private org.silverpeas.components.gallery.constant.MediaResolution currentMediaResolution;
  private java.lang.Integer nbMediaPerPage;
  private java.lang.Integer currentPageIndex;
  private java.util.List mediaList;

  public org.silverpeas.components.gallery.constant.MediaResolution getCurrentMediaResolution() {
    return this.currentMediaResolution;
  }

  public void setCurrentMediaResolution(org.silverpeas.components.gallery.constant.MediaResolution currentMediaResolution) {
    this.currentMediaResolution = currentMediaResolution;
    jspContext.setAttribute("currentMediaResolution", currentMediaResolution);
  }

  public java.lang.Integer getNbMediaPerPage() {
    return this.nbMediaPerPage;
  }

  public void setNbMediaPerPage(java.lang.Integer nbMediaPerPage) {
    this.nbMediaPerPage = nbMediaPerPage;
    jspContext.setAttribute("nbMediaPerPage", nbMediaPerPage);
  }

  public java.lang.Integer getCurrentPageIndex() {
    return this.currentPageIndex;
  }

  public void setCurrentPageIndex(java.lang.Integer currentPageIndex) {
    this.currentPageIndex = currentPageIndex;
    jspContext.setAttribute("currentPageIndex", currentPageIndex);
  }

  public java.util.List getMediaList() {
    return this.mediaList;
  }

  public void setMediaList(java.util.List mediaList) {
    this.mediaList = mediaList;
    jspContext.setAttribute("mediaList", mediaList);
  }

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public java.util.Set<java.lang.String> getPackageImports() {
    return _jspx_imports_packages;
  }

  public java.util.Set<java.lang.String> getClassImports() {
    return _jspx_imports_classes;
  }

  public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
    return _el_expressionfactory;
  }

  public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
    return _jsp_instancemanager;
  }

  private void _jspInit(javax.servlet.ServletConfig config) {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(config.getServletContext()).getExpressionFactory();
    _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(config);
  }

  public void _jspDestroy() {
  }

  public void doTag() throws javax.servlet.jsp.JspException, java.io.IOException {
    javax.servlet.jsp.PageContext _jspx_page_context = (javax.servlet.jsp.PageContext)jspContext;
    javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest) _jspx_page_context.getRequest();
    javax.servlet.http.HttpServletResponse response = (javax.servlet.http.HttpServletResponse) _jspx_page_context.getResponse();
    javax.servlet.http.HttpSession session = _jspx_page_context.getSession();
    javax.servlet.ServletContext application = _jspx_page_context.getServletContext();
    javax.servlet.ServletConfig config = _jspx_page_context.getServletConfig();
    javax.servlet.jsp.JspWriter out = jspContext.getOut();
    _jspInit(config);
    jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,jspContext);
    if( getCurrentMediaResolution() != null ) 
      _jspx_page_context.setAttribute("currentMediaResolution", getCurrentMediaResolution());
    if( getNbMediaPerPage() != null ) 
      _jspx_page_context.setAttribute("nbMediaPerPage", getNbMediaPerPage());
    if( getCurrentPageIndex() != null ) 
      _jspx_page_context.setAttribute("currentPageIndex", getCurrentPageIndex());
    if( getMediaList() != null ) 
      _jspx_page_context.setAttribute("mediaList", getMediaList());

    try {
      out.write("\n\n\n\n\n\n\n\n\n\n");
      out.write('\n');
      if (_jspx_meth_fmt_005fsetLocale_005f0(_jspx_page_context))
        return;
      out.write('\n');
      if (_jspx_meth_view_005fsetBundle_005f0(_jspx_page_context))
        return;
      out.write("\n\n\n\n\n\n");
      java.util.List<org.silverpeas.components.gallery.model.Media> mediaList = null;
      mediaList = (java.util.List<org.silverpeas.components.gallery.model.Media>) _jspx_page_context.getAttribute("mediaList", javax.servlet.jsp.PageContext.PAGE_SCOPE);
      if (mediaList == null){
        throw new java.lang.InstantiationException("bean mediaList not found within scope");
      }
      out.write("\n\n<table border=\"0\" width=\"100%\">\n  <tr>\n    <td align=\"center\" width=\"100%\" class=ArrayNavigation>\n      ");
      if (_jspx_meth_c_005fout_005f0(_jspx_page_context))
        return;
      out.write("\n      ");
      if (_jspx_meth_fmt_005fmessage_005f0(_jspx_page_context))
        return;
      out.write("\n      ");
      if (_jspx_meth_fmt_005fmessage_005f1(_jspx_page_context))
        return;
      out.write("\n      ");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:length(mediaList) <= 1 ? oneMediaLabel : severalMediaLabel}", java.lang.String.class, (javax.servlet.jsp.PageContext)this.getJspContext(), _jspx_fnmap_0));
      out.write("\n    </td>\n    <td align=\"right\" nowrap>\n      ");
      if (_jspx_meth_gallery_005falbumListDisplaySelector_005f0(_jspx_page_context))
        return;
      out.write("\n    </td>\n  </tr>\n</table>");
    } catch( java.lang.Throwable t ) {
      if( t instanceof javax.servlet.jsp.SkipPageException )
          throw (javax.servlet.jsp.SkipPageException) t;
      if( t instanceof java.io.IOException )
          throw (java.io.IOException) t;
      if( t instanceof java.lang.IllegalStateException )
          throw (java.lang.IllegalStateException) t;
      if( t instanceof javax.servlet.jsp.JspException )
          throw (javax.servlet.jsp.JspException) t;
      throw new javax.servlet.jsp.JspException(t);
    } finally {
      jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,super.getJspContext());
      ((org.apache.jasper.runtime.JspContextWrapper) jspContext).syncEndTagFile();
    }
  }

  private boolean _jspx_meth_fmt_005fsetLocale_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  fmt:setLocale
    org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag _jspx_th_fmt_005fsetLocale_005f0 = new org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_fmt_005fsetLocale_005f0);
    _jspx_th_fmt_005fsetLocale_005f0.setPageContext(_jspx_page_context);
    _jspx_th_fmt_005fsetLocale_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) this ));
    // /WEB-INF/tags/silverpeas/gallery/albumListHeader.tag(34,0) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_fmt_005fsetLocale_005f0.setValue((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${requestScope.resources.language}", java.lang.Object.class, (javax.servlet.jsp.PageContext)this.getJspContext(), null));
    int _jspx_eval_fmt_005fsetLocale_005f0 = _jspx_th_fmt_005fsetLocale_005f0.doStartTag();
    if (_jspx_th_fmt_005fsetLocale_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      throw new javax.servlet.jsp.SkipPageException();
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_fmt_005fsetLocale_005f0, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_view_005fsetBundle_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  view:setBundle
    org.silverpeas.core.web.util.viewgenerator.html.SetBundleTag _jspx_th_view_005fsetBundle_005f0 = new org.silverpeas.core.web.util.viewgenerator.html.SetBundleTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_view_005fsetBundle_005f0);
    _jspx_th_view_005fsetBundle_005f0.setPageContext(_jspx_page_context);
    _jspx_th_view_005fsetBundle_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) this ));
    // /WEB-INF/tags/silverpeas/gallery/albumListHeader.tag(35,0) name = bundle type = org.silverpeas.kernel.bundle.SilverpeasBundle reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_view_005fsetBundle_005f0.setBundle((org.silverpeas.kernel.bundle.SilverpeasBundle) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${requestScope.resources.multilangBundle}", org.silverpeas.kernel.bundle.SilverpeasBundle.class, (javax.servlet.jsp.PageContext)this.getJspContext(), null));
    int _jspx_eval_view_005fsetBundle_005f0 = _jspx_th_view_005fsetBundle_005f0.doStartTag();
    if (_jspx_th_view_005fsetBundle_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      throw new javax.servlet.jsp.SkipPageException();
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_view_005fsetBundle_005f0, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_c_005fout_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:out
    org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_005fout_005f0 = new org.apache.taglibs.standard.tag.rt.core.OutTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_c_005fout_005f0);
    _jspx_th_c_005fout_005f0.setPageContext(_jspx_page_context);
    _jspx_th_c_005fout_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) this ));
    // /WEB-INF/tags/silverpeas/gallery/albumListHeader.tag(56,6) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_c_005fout_005f0.setValue((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${silfn:formatPaginationFromFirstIndexOfItem(nbMediaPerPage, fn:length(mediaList), currentPageIndex)}", java.lang.Object.class, (javax.servlet.jsp.PageContext)this.getJspContext(), _jspx_fnmap_0));
    int _jspx_eval_c_005fout_005f0 = _jspx_th_c_005fout_005f0.doStartTag();
    if (_jspx_th_c_005fout_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      throw new javax.servlet.jsp.SkipPageException();
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005fout_005f0, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_fmt_005fmessage_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_005fmessage_005f0 = new org.apache.taglibs.standard.tag.rt.fmt.MessageTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_fmt_005fmessage_005f0);
    _jspx_th_fmt_005fmessage_005f0.setPageContext(_jspx_page_context);
    _jspx_th_fmt_005fmessage_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) this ));
    // /WEB-INF/tags/silverpeas/gallery/albumListHeader.tag(57,6) name = key type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_fmt_005fmessage_005f0.setKey("gallery.media");
    // /WEB-INF/tags/silverpeas/gallery/albumListHeader.tag(57,6) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_fmt_005fmessage_005f0.setVar("oneMediaLabel");
    int _jspx_eval_fmt_005fmessage_005f0 = _jspx_th_fmt_005fmessage_005f0.doStartTag();
    if (_jspx_th_fmt_005fmessage_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      throw new javax.servlet.jsp.SkipPageException();
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_fmt_005fmessage_005f0, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_fmt_005fmessage_005f1(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_005fmessage_005f1 = new org.apache.taglibs.standard.tag.rt.fmt.MessageTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_fmt_005fmessage_005f1);
    _jspx_th_fmt_005fmessage_005f1.setPageContext(_jspx_page_context);
    _jspx_th_fmt_005fmessage_005f1.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) this ));
    // /WEB-INF/tags/silverpeas/gallery/albumListHeader.tag(58,6) name = key type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_fmt_005fmessage_005f1.setKey("gallery.media.several");
    // /WEB-INF/tags/silverpeas/gallery/albumListHeader.tag(58,6) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_fmt_005fmessage_005f1.setVar("severalMediaLabel");
    int _jspx_eval_fmt_005fmessage_005f1 = _jspx_th_fmt_005fmessage_005f1.doStartTag();
    if (_jspx_th_fmt_005fmessage_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      throw new javax.servlet.jsp.SkipPageException();
    }
    org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_fmt_005fmessage_005f1, _jsp_getInstanceManager());
    return false;
  }

  private boolean _jspx_meth_gallery_005falbumListDisplaySelector_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  gallery:albumListDisplaySelector
    org.apache.jsp.tag.web.silverpeas.gallery.albumListDisplaySelector_tag _jspx_th_gallery_005falbumListDisplaySelector_005f0 = new org.apache.jsp.tag.web.silverpeas.gallery.albumListDisplaySelector_tag();
    _jsp_getInstanceManager().newInstance(_jspx_th_gallery_005falbumListDisplaySelector_005f0);
    try {
      _jspx_th_gallery_005falbumListDisplaySelector_005f0.setJspContext(_jspx_page_context);
      _jspx_th_gallery_005falbumListDisplaySelector_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) this ));
      // /WEB-INF/tags/silverpeas/gallery/albumListHeader.tag(62,6) name = currentMediaResolution type = org.silverpeas.components.gallery.constant.MediaResolution reqTime = true required = true fragment = false deferredValue = false expectedTypeName = java.lang.String deferredMethod = false methodSignature = null
      _jspx_th_gallery_005falbumListDisplaySelector_005f0.setCurrentMediaResolution((org.silverpeas.components.gallery.constant.MediaResolution) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${currentMediaResolution}", org.silverpeas.components.gallery.constant.MediaResolution.class, (javax.servlet.jsp.PageContext)this.getJspContext(), null));
      _jspx_th_gallery_005falbumListDisplaySelector_005f0.doTag();
    } finally {
      _jsp_getInstanceManager().destroyInstance(_jspx_th_gallery_005falbumListDisplaySelector_005f0);
    }
    return false;
  }
}
