<script lang="ts">
export let data: any;

import type { key_val } from '$lib/ae_stores';
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
import { events_loc, events_sess, events_slct, events_trigger, events_trig_kv } from '$lib/ae_events_stores';
import { events_func } from '$lib/ae_events_functions';

import Element_ae_crud from '$lib/element_ae_crud.svelte';
import Element_data_store from '$lib/element_data_store.svelte';
// import Sign_in_out from './sign_in_out.svelte';

export let lq__event_obj: any;

let ae_tmp: key_val = {};
let ae_triggers: key_val = {};

</script>


<!-- New standard page specific menu 2024-08-01 -->
<div
    class="pres_mgmt__session_search {ae_snip.classes__events_pres_mgmt_menu}"
    class:border-none={!$events_loc.pres_mgmt.show_menu__session_search}
    >

    <!-- BEGIN: The menu button options -->
    <div
        class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">

    <span
        class="ae_menu__navigation_options"
        class:hidden={!$ae_loc.trusted_access}
        >
        <a
            href="/core"
            class="{ae_snip.classes__events_pres_mgmt_menu__button}"
            class:hidden={!$ae_loc.administrator_access}
            >
            <span class="fas fa-cogs m-1"></span>
            &AElig; Core
        </a>

        <a
            href="/events_pres_mgmt/event/{$lq__event_obj?.event_id_random}/reports"
            class="{ae_snip.classes__events_pres_mgmt_menu__button}"
            class:hidden={!$ae_loc.trusted_access}
            >
            <span class="fas fa-chart-line m-1"></span>
            Pres Mgmt Reports
        </a>
    </span>

    <span
        class="ae_menu__object_options"
        >
    <button
        type="button"
        on:click={() => {
            if ($events_loc.pres_mgmt.show_menu__session_search == 'help') {
                $events_loc.pres_mgmt.show_menu__session_search = null;
            } else {
                $events_loc.pres_mgmt.show_menu__session_search = 'help';
            }
        }}
        class="{ae_snip.classes__events_pres_mgmt_menu__button}"
        title="Help and information about the session search"
        >
        <span class="fas fa-question-circle m-1"></span>
        {#if $events_loc.pres_mgmt.show_menu__session_search}
            Hide
        {:else}
            Show
        {/if}
        Help?
    </button>
    </span>

    <span
        class="ae_menu__action_options"
        class:hidden={true}
        >
        Nothing here yet.
    </span>


    </div> <!-- END: The menu button options -->


    <!-- BEGIN: The expanded menu area for information and options -->
    <div
        class="flex flex-row items-center justify-around w-full bg-blue-100 hover:bg-blue-200 border border-blue-200 hover:border-blue-400 p-2 rounded-md"
        class:hidden={$events_loc.pres_mgmt.show_menu__session != 'options'}
        >

    </div> <!-- END: The expanded menu area for information and options -->

    <Element_data_store
        ds_code="events__pres_mgmt__session_search_help"
        ds_name="Default: Events - Pres Mgmt Session Search Help"
        ds_type="html"
        for_type="event"
        for_id={$events_slct.event_id}
        class_li="bg-yellow-100 border border-yellow-400 p-2 rounded-md"
        show_edit={false}
        show_edit_btn={true}
        hide={$events_loc.pres_mgmt.show_menu__session_search != 'help'}
        />

    <div>
        <button
            type="button"
            on:click={() => {
                $events_loc.pres_mgmt.show_menu__session_search = !$events_loc.pres_mgmt.show_menu__session_search;
            }}
            class="btn btn-sm mx-1 variant-ghost-error hover:variant-filled-error"
            class:hidden={!$events_loc.pres_mgmt.show_menu__session_search}
            title="Collapse the expanded menu"
            >
            <span class="fas fa-chevron-up m-1"></span>
            {#if $events_loc.pres_mgmt.show_menu__session_search}
                Hide
            {:else}
                Show
            {/if}
            <!-- Menu? -->
        </button>
    </div>
</div>
