/* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md */ const { templates } = app; const arrow = ""; templates.sidebarDoc = function(doc, options) { if (options == null) { options = {}; } let link = ``; if (options.disabled) { link += `Enable`; } else { link += arrow; } if (doc.release) { link += `${doc.release}`; } link += `${doc.name}`; if (options.fullName || (options.disabled && doc.version)) { link += ` ${doc.version}`; } return link + ""; }; templates.sidebarType = type => `${arrow}${type.count}${$.escape(type.name)}`; templates.sidebarEntry = entry => `${$.escape(entry.name)}`; templates.sidebarResult = function(entry) { let addons = entry.isIndex() && app.disabledDocs.contains(entry.doc) ? `Enable` : ""; if (entry.doc.version && !entry.isIndex()) { addons += `${entry.doc.short_version}`; } return `${addons}${$.escape(entry.name)}`; }; templates.sidebarNoResults = function() { let html = "
No results.
"; if (!app.isSingleDoc() && !app.disabledDocs.isEmpty()) { html += `\
Note: documentations must be enabled to appear in the search.
\ `; } return html; }; templates.sidebarPageLink = count => `Show more\u2026 (${count})`; templates.sidebarLabel = function(doc, options) { if (options == null) { options = {}; } let label = "`; }; templates.sidebarVersionedDoc = function(doc, versions, options) { if (options == null) { options = {}; } let html = `
${arrow}${doc.name}
${versions}
`; }; templates.sidebarDisabled = options => `
${arrow}Disabled (${options.count}) Customize
`; templates.sidebarDisabledList = html => `
${html}
`; templates.sidebarDisabledVersionedDoc = (doc, versions) => `${arrow}${doc.name}
${versions}
`; templates.docPickerHeader = "
Documentation Enable
"; templates.docPickerNote = `\
Tip: for faster and better search results, select only the docs you need.
Vote for new documentation\ `;