<script lang="ts">
    import {
        ae_snip,
        ae_loc,
        ae_sess,
        ae_api,
        ae_trig,
        slct,
        slct_trigger
    } from '$lib/stores/ae_stores';

    interface Props {
        // import { events_loc, events_sess, events_slct, events_trigger, events_trig_kv } from '$lib/stores/ae_events_stores';
        hide?: boolean;
        event_id?: null | string;
        ae_core?: boolean;
        events__launcher_id?: null | string; // event_location_id
        events__location_id?: null | string; // event_location_id
        events__locations?: boolean; // event_id
        // export let events__presenter_id: null|string = null; // event_presenter_id
        events__reports?: boolean; // event_id
        events__settings?: boolean; // event_id
        events__session_id?: null | string; // event_session_id
        events__session_search?: boolean; // event_id
    }

    let {
        hide = true,
        event_id = null,
        ae_core = false,
        events__launcher_id = null,
        events__location_id = null,
        events__locations = false,
        events__reports = false,
        events__settings = false,
        events__session_id = null,
        events__session_search = false
    }: Props = $props();
</script>

<!-- This is for common navigation links. -->
<div
    class="ae_comp__events_menu_nav flex flex-row flex-wrap gap-1.5 items-center justify-around"
    class:hidden={hide}
>
    <span
        class="ae_menu__navigation_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
    >
        <a
            href="/core"
            class="btn btn-sm mx-1 ae_btn_info"
            class:hidden={!ae_core}
        >
            <span class="fas fa-cogs m-1"></span>
            Æ Core
        </a>

        <a
            href="/events/{event_id}/reports"
            class="btn btn-sm mx-1 ae_btn_info"
            class:hidden={!events__reports}
        >
            <span class="fas fa-chart-line m-1"></span>
            Pres Mgmt Reports
        </a>
        <a
            href="/events/{event_id}/locations"
            class="btn btn-sm mx-1 ae_btn_info"
            class:hidden={!events__locations}
        >
            <!-- <span class="fas fa-map-marker-alt m-1"></span> -->
            <span class="fas fa-map-marked-alt m-1"></span>
            Locations
        </a>
        <a
            href="/events/{event_id}/settings"
            class="btn btn-sm mx-1 ae_btn_warning"
            class:hidden={!events__settings}
        >
            <span class="fas fa-tools m-1"></span>
            Admin Tools
        </a>
    </span>

    <span
        class="ae_menu__navigation_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
    >
        <a
            href="/events/{event_id}/pres_mgmt"
            class="btn btn-sm mx-1 ae_btn_info"
            class:hidden={!events__session_search}
        >
            <span class="fas fa-search m-1"></span>
            Session Search
        </a>
        <a
            href="/events/{event_id}/session/{events__session_id}"
            class="btn btn-sm mx-1 ae_btn_info"
            class:hidden={!events__session_id}
        >
            <!-- <span class="fas fa-arrow-left m-1"></span> -->
            <span class="fas fa-chalkboard-teacher m-1"></span>
            Back to Session
        </a>
        <a
            href="/events/{event_id}/launcher{events__launcher_id ? '/' + events__launcher_id : ''}"
            class="btn btn-sm mx-1 ae_btn_info"
            class:hidden={!event_id}
        >
            <span class="fas fa-plane m-1"></span>
            Launcher
        </a>
        <a
            href="/events/{event_id}/location/{events__location_id}"
            class="btn btn-sm mx-1 ae_btn_info"
            class:hidden={!events__location_id}
        >
            <!-- <span class="fas fa-map m-1"></span> -->
            <span class="fas fa-map-marker-alt m-1"></span>
            Session Location
        </a>
    </span>
</div>
