import{f as $,I as S,J as T,e as f,d as t,w as l,g as s,k as N,z as a,t as g,F,r as m,A as v,o as p,D as V}from"../modules/vue-DkYzewYG.js";import{u as H,j as B,k as D,s as E,l as x,m as I}from"../index-Dgc7rSMr.js";import{_ as L,C as j}from"./NoteDisplay.vue_vue_type_style_index_0_lang-19iAGaT9.js";import{_ as A,a as J}from"./TimerBar.vue_vue_type_script_setup_true_lang-D856v25E.js";import{_ as i}from"./IconButton.vue_vue_type_script_setup_true_lang-Bk4_sWNY.js";import{_ as M}from"./Modal.vue_vue_type_script_setup_true_lang-CZdOOjRt.js";import"../modules/shiki-COU8xzp7.js";const R={class:"flex my-1"},U={class:"h-full flex flex-col"},q={class:"flex-none border-t border-main",px3:"",py2:""},G={class:"flex-none border-t border-main"},K={class:"flex gap-1 items-center px-6 py-3"},O={key:0,class:"i-carbon:minimize"},P={key:1,class:"i-carbon:maximize"},Q={class:"px2 my-auto"},W={class:"text-lg"},X={class:"opacity-50 text-sm"},ae=$({__name:"notes",setup(Y){H({title:`Notes - ${E}`});const{slides:y,total:C}=B(),{isFullscreen:_,toggle:z}=D,k=m(),o=S("slidev-notes-font-size",18),n=v(()=>x.page),r=m(!1),b=v(()=>y.value.find(c=>c.no===n.value));T(n,()=>{k.value?.scrollTo({left:0,top:0,behavior:"smooth"}),window.scrollTo({left:0,top:0,behavior:"smooth"})});function h(){o.value=o.value+1}function w(){o.value=o.value-1}const d=v(()=>{const c=x.clicks,e=x.clicksTotal;return I(m(c),void 0,e)});return(c,e)=>(p(),f(F,null,[t(M,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=u=>r.value=u),class:"px-6 py-4 flex flex-col gap-2"},{default:l(()=>[e[3]||(e[3]=s("div",{class:"flex gap-2 text-xl"},[s("div",{class:"i-carbon:information my-auto"}),V(" Help ")],-1)),e[4]||(e[4]=s("div",{class:"prose dark:prose-invert"},[s("p",null,"This is the hands-free live notes viewer."),s("p",null,"It's designed to be used in a separate view or device. The progress is controlled by and auto synced with the main presenter or slide.")],-1)),s("div",R,[s("button",{class:"slidev-form-button",onClick:e[0]||(e[0]=u=>r.value=!1)}," Close ")])]),_:1},8,["modelValue"]),s("div",U,[t(A,{"clicks-context":d.value,current:n.value},null,8,["clicks-context","current"]),t(J),s("div",{ref_key:"scroller",ref:k,class:"px-5 py-3 flex-auto h-full overflow-auto",style:N({fontSize:`${a(o)}px`})},[t(L,{note:b.value?.meta.slide.note,"note-html":b.value?.meta.slide.noteHTML,placeholder:`No notes for Slide ${n.value}.`,"clicks-context":d.value,"auto-scroll":!0},null,8,["note","note-html","placeholder","clicks-context"])],4),s("div",q,[t(j,{"clicks-context":d.value,readonly:""},null,8,["clicks-context"])]),s("div",G,[s("div",K,[t(i,{title:a(_)?"Close fullscreen":"Enter fullscreen",onClick:a(z)},{default:l(()=>[a(_)?(p(),f("div",O)):(p(),f("div",P))]),_:1},8,["title","onClick"]),t(i,{title:"Increase font size",onClick:h},{default:l(()=>[...e[5]||(e[5]=[s("div",{class:"i-carbon:zoom-in"},null,-1)])]),_:1}),t(i,{title:"Decrease font size",onClick:w},{default:l(()=>[...e[6]||(e[6]=[s("div",{class:"i-carbon:zoom-out"},null,-1)])]),_:1}),t(i,{title:"Edit notes",to:"/notes-edit",target:"_blank"},{default:l(()=>[...e[7]||(e[7]=[s("div",{class:"i-carbon:edit"},null,-1)])]),_:1}),t(i,{title:"Help",class:"rounded-full",onClick:e[2]||(e[2]=u=>r.value=!0)},{default:l(()=>[...e[8]||(e[8]=[s("div",{class:"i-carbon:help"},null,-1)])]),_:1}),e[9]||(e[9]=s("div",{class:"flex-auto"},null,-1)),s("div",Q,[s("span",W,g(n.value),1),s("span",X," / "+g(a(C)),1)])])])])],64))}});export{ae as default};
