1 L.OSM.sidebarPane = function (options, uiClass, buttonTitle, paneTitle) {
 
   2   const control = L.control(options);
 
   4   control.onAdd = function (map) {
 
   5     const $container = $("<div>")
 
   6       .attr("class", "control-" + uiClass);
 
   8     const button = $("<a>")
 
   9       .attr("class", "control-button")
 
  13     $(L.SVG.create("svg"))
 
  14       .append($(L.SVG.create("use")).attr("href", "#icon-" + uiClass))
 
  15       .attr("class", "h-100 w-100")
 
  19       button.attr("title", OSM.i18n.t(buttonTitle));
 
  22     button.appendTo($container);
 
  24     const $ui = $("<div>")
 
  25       .attr("class", `${uiClass}-ui position-relative z-n1`);
 
  27     $("<h2 class='p-3 pb-0 pe-5 text-break'>")
 
  28       .text(OSM.i18n.t(paneTitle))
 
  31     options.sidebar.addPane($ui);
 
  33     this.onAddPane(map, button, $ui, toggle);
 
  38       if (!button.hasClass("disabled")) {
 
  39         options.sidebar.togglePane($ui, button);
 
  41       $(".leaflet-control .control-button").tooltip("hide");
 
  47   // control.onAddPane = function (map, button, $ui, toggle) {