2025-06-22 00:21:09 +03:00

42 lines
4.6 KiB
JavaScript

import { s as subscribe, n as null_to_empty } from "../../../chunks/utils.js";
import { c as create_ssr_component, e as escape, v as validate_component } from "../../../chunks/ssr.js";
import { w as walletStore } from "../../../chunks/walletStore.js";
import "../../../chunks/expenseStore.js";
import { c as contactsStore } from "../../../chunks/contactsStore.js";
import { a as accountBalancesStore, S as SidebarMenu } from "../../../chunks/SidebarMenu.js";
const css = {
code: "@media(max-width: 1023px){.fixed.inset-y-0.left-0.z-50.svelte-kdmbd0{position:fixed !important}}",
map: null
};
const DashboardLayout = create_ssr_component(($$result, $$props, $$bindings, slots) => {
let $walletStore, $$unsubscribe_walletStore;
$$unsubscribe_walletStore = subscribe(walletStore, (value) => $walletStore = value);
let { path: path2 = "" } = $$props;
if ($$props.path === void 0 && $$bindings.path && path2 !== void 0) $$bindings.path(path2);
$$result.css.add(css);
{
if ($walletStore.publicKey) {
accountBalancesStore.loadBalances($walletStore.publicKey);
}
}
$$unsubscribe_walletStore();
return `<div class="min-h-screen bg-gray-50"> ${``} <div class="${escape(null_to_empty(`fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-lg transform transition-transform duration-300 ease-in-out lg:translate-x-0 lg:static lg:inset-0 ${"-translate-x-full"}`), true) + " svelte-kdmbd0"}">${validate_component(SidebarMenu, "SidebarMenu").$$render($$result, {}, {}, {})}</div> <div class="lg:pl-64"> <div class="lg:hidden"><div class="flex items-center justify-between px-4 py-3 bg-white border-b border-gray-200"><button class="p-2 rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500" aria-label="Open sidebar" data-svelte-h="svelte-1fdsf0v"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg></button> <div class="flex items-center" data-svelte-h="svelte-r19jyy"><span class="text-xl">💸</span> <span class="ml-2 text-lg font-semibold">InstantSplit</span></div> <div class="w-10"></div> </div></div> <main class="flex-1"><div class="py-6"><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> ${path2 && path2 !== "/dashboard" ? `<nav class="flex mb-6" aria-label="Breadcrumb"><ol class="flex items-center space-x-2"><li data-svelte-h="svelte-u3zmgr"><a href="/dashboard" class="text-gray-500 hover:text-gray-700"><svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"></path></svg> <span class="sr-only">Home</span></a></li> <li class="flex items-center"><svg class="w-5 h-5 text-gray-400" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg> <span class="ml-2 text-sm font-medium text-gray-900 capitalize">${escape(path2.replace(/^\//, "").replace(/-/g, " "))}</span></li></ol></nav>` : ``} ${slots.default ? slots.default({}) : ``}</div></div></main></div> ${!$walletStore.publicKey ? `<div class="fixed bottom-4 right-4 bg-yellow-100 border border-yellow-300 text-yellow-800 px-4 py-3 rounded-lg shadow-lg z-50" data-svelte-h="svelte-4p9gjc"><div class="flex items-center"><svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg> <span class="text-sm font-medium">Please connect your wallet to continue</span></div></div>` : ``} </div>`;
});
const path = "/split";
const Layout = create_ssr_component(($$result, $$props, $$bindings, slots) => {
let $$unsubscribe_contactsStore;
let $$unsubscribe_walletStore;
$$unsubscribe_contactsStore = subscribe(contactsStore, (value) => value);
$$unsubscribe_walletStore = subscribe(walletStore, (value) => value);
$$unsubscribe_contactsStore();
$$unsubscribe_walletStore();
return `${validate_component(DashboardLayout, "DashboardLayout").$$render($$result, { path }, {}, {
default: () => {
return `${slots.default ? slots.default({}) : ``}`;
}
})}`;
});
export {
Layout as default
};