<script lang="ts">
	import { loginModalStore } from "$lib/stores/use-login-modal";
	import { userStore } from "$lib/stores/use-user";


  const handleClick = (e: any) => {
    e.preventDefault();
    e.stopPropagation();
    if (!$userStore) {
      loginModalStore.update(() => true);
    }
  };
</script>

<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
  class="w-full cursor-pointer block"
  on:click={handleClick}
>
  <div class:pointer-events-none={!$userStore}>
    <slot />
  </div>
</div>