<script lang="ts">
/** @type {import('./$types').LayoutData} */
let log_lvl: number = 0;
if (log_lvl > 1) {
    console.log(`ae_idaa_archives +layout.svelte`);
}

// *** Import Aether specific variables and functions
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';

interface Props {
    /** @type {import('./$types').LayoutData} */
    data: any;
    children?: import('svelte').Snippet;
}

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

// *** Quickly pull out data from parent(s)
let ae_acct = data[$slct.account_id];
if (log_lvl) {
    console.log(`ae_acct = `, ae_acct);
}

$idaa_slct.archive_obj_li = ae_acct.slct.archive_obj_li;
// $idaa_slct.archive_id = ae_acct.slct.archive_id; // Not set here yet.

// *** Set initial variables
// if (browser) {
//     $idaa_loc.novi_uuid = data.params.uuid;
//     $idaa_loc.novi_email = decodeURIComponent(data.params.email);
//     $idaa_loc.novi_full_name = decodeURIComponent(data.params.full_name);
//     // $idaa_loc.novi_admin_li = novi_admin_li;
//     // $idaa_loc.novi_trusted_li = novi_trusted_li;
//     console.log(`$idaa_loc.novi_uuid:`, $idaa_loc.novi_uuid);
// }
</script>


{@render children?.()}
