import { html, render } from "/js/lib/lit-html.js"; import { effect } from "/js/signals.js"; import { auth } from "/js/auth.js"; import { sidebarTemplate } from "/js/templates/sidebar.template.js"; import { footerTemplate } from "/js/templates/footer.template.js"; import { eyeIconTemplate } from "/js/templates/icons/eyeIcon.template.js"; import { PLUGIN_PREVIEW_QUERY_PARAM } from "/js/plugins/pluginService.js"; function exitPluginPreview() { const url = new URL(window.location.href); url.searchParams.delete(PLUGIN_PREVIEW_QUERY_PARAM); window.location.assign(url.toString()); } function pluginPreviewBannerTemplate({ plugins }) { if (plugins.length === 0) return null; const links = []; plugins.forEach((plugin, index) => { if (index > 0) links.push(", "); links.push( html`${plugin.name}`, ); }); return html`
`; } import { Layout } from "/js/router.js"; import "/js/components/animated-sidebar.js"; export function mainLayoutTemplate({ isAuthenticated = true, currentUser, activeNavItem, numNotifications = 0, numChatNotifications = 0, onClickActiveNavItem, children, onClickComposeButton, pluginService, previewingPlugins = [], onLongPressProfile = null, groupChatLinkService, }) { return html`