<script lang="ts">
	interface Props {
		/** @type {import('./$types').LayoutData} */
		data: any;
		children?: import('svelte').Snippet;
	}

	let { data, children }: Props = $props();

	let log_lvl: number = 0;

	// import { browser } from '$app/environment';
	// import { goto, invalidate, pushState, replaceState } from '$app/navigation';

	// import type { key_val } from '$lib/ae_stores';
	// import { ae_util } from '$lib/ae_utils/ae_utils';
	// import Element_data_store from '$lib/element_data_store_v2.svelte';

	// import { liveQuery } from "dexie";
	// import { core_func } from '$lib/ae_core_functions';
	// import { db_events } from "$lib/db_events";
	import {
		ae_snip,
		ae_loc,
		ae_sess,
		ae_api,
		ae_trig,
		slct,
		slct_trigger
	} from '$lib/stores/ae_stores';
	import {
		events_loc,
		events_sess,
		events_slct,
		events_trigger
	} from '$lib/stores/ae_events_stores';

	// import { events_func } from '$lib/ae_events_functions';

	// import Event_page_menu from '../event_page_menu.svelte';

	// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
	// $slct.account_id = data.account_id;
	let ae_acct = data[$slct.account_id];
	if (log_lvl) {
		console.log(`ae_acct = `, ae_acct);
	}

	if (log_lvl > 1) {
		console.log(`[event_id] +layout A: ${data.params.event_id}`);
		console.log(`[event_id] +layout B: ${ae_acct.slct.event_id}`);
		console.log(`[event_id] +layout C: ${$events_slct.event_id}`);
	}

	// $: event_id = data.params.event_id;
	// console.log(`event_id layout D: ${event_id}`);

	// $events_slct.event_id = event_id;
	// $events_slct.event_obj = ae_acct.slct.event_obj;
	$events_slct.event_session_obj_li = ae_acct.slct.event_session_obj_li;
	$events_slct.event_location_obj_li = ae_acct.slct.event_location_obj_li;
</script>

{@render children?.()}
