lms/public/build/assets/attempt-navbar-CpeYyj_5.js
2025-12-15 12:26:23 +01:00

2 lines
1.5 KiB
JavaScript

import{r as t,j as e,L as f,o as p,c_ as h}from"./vendor-BKmmeuxg.js";import{A as j}from"./app-logo-CmnEIwal.js";import{B as g}from"./button-BpNwv2aE.js";import{u as v}from"./use-screen-DU5n3V8C.js";import{c}from"./utils-DxSsnXxD.js";import"./index-WW_1X1qx.js";const L=({attempt:r,questionIndex:w})=>{const{screen:a}=v(),[d,i]=t.useState(!1),[m,N]=t.useState(!1),[n,u]=t.useState(!1);r.exam.questions,t.useEffect(()=>{const s=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",s),()=>{window.removeEventListener("scroll",s)}},[]);const x=()=>{var s,l,o;n?(o=document.exitFullscreen)==null||o.call(document):(l=(s=document.documentElement).requestFullscreen)==null||l.call(s),u(!n)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:c("fixed top-0 z-30 w-full",m&&"bg-background"),children:e.jsx("div",{className:c("gap-1 !px-4 transition-all duration-200 md:gap-6",d&&"bg-background shadow-card mx-auto w-full",a<768&&"rounded-none"),children:e.jsxs("div",{className:"container flex items-center justify-between",children:[e.jsx("div",{className:"flex h-[72px] items-center gap-2",children:e.jsx(f,{href:"/",children:e.jsx(j,{})})}),a>768&&e.jsx("h1",{className:"text-xl font-bold",children:r.exam.title}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(g,{variant:"outline",size:"sm",onClick:x,children:n?e.jsx(p,{className:"h-4 w-4"}):e.jsx(h,{className:"h-4 w-4"})})})]})})}),e.jsx("div",{className:"relative z-20 h-[72px] bg-transparent"})]})};export{L as default};