"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[88871],{95720:function(e,t,n){var o=n(62540),i=(n(63696),n(4452)),l=n.n(i),r=n(46782),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};t.A=function(e){var t=e.className,n=e.title,i=e.icon,c=e.iconClassName,s=e.disabled,u=void 0!==s&&s,f=e.onClick,d=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["className","title","icon","iconClassName","disabled","onClick"]),v=l()("paper-icon-button-light",t,{"show-focus":r.A.tv}),p=l()("material-icons",c,i);return(0,o.jsx)("button",a({className:v,title:n,disabled:u,onClick:f},d,{children:(0,o.jsx)("span",{className:p,"aria-hidden":"true"})}))}},86321:function(e,t,n){n.r(t);var o=n(62540),i=n(63696),l=n(95720),r=n(5898),a=n(95569),c=n(35222),s=function(){return s=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)},u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,l=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(o=l.next()).done;)r.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}return r};t.default=function(e){var t=e.item,n=e.onExit,f=e.onPrevious,d=e.onNext,v=e.onOpenTableOfContents,p=e.onRotateTheme,b=e.onDecreaseFontSize,y=e.onIncreaseFontSize,m=e.onToggleDirection,k=e.onToggleLayout,g=e.onToggleFullscreen,h=a.dg(t.Id),w=(0,i.useRef)(),x=u((0,i.useState)("rtl"===h.langDir),2),A=x[0],j=x[1],C=u((0,i.useState)(2===h.pagesPerView),2),O=C[0],N=C[1],S=u((0,i.useState)(!1),2),T=S[0],_=S[1],E=u((0,i.useState)(!0),2),P=E[0],L=E[1],F=(0,i.useCallback)((function(){clearTimeout(w.current),w.current=setTimeout((function(){return L(!1)}),2e3)}),[]),R=(0,i.useCallback)((function(e){c.A.isEnabled&&c.A.isFullscreen!==e?c.A.toggle():window.NativeShell&&(e?window.NativeShell.enableFullscreen():window.NativeShell.disableFullscreen())}),[]),V=(0,i.useCallback)((function(){null==m||m(),j((function(e){return!e}))}),[m]),D=(0,i.useCallback)((function(){null==k||k(),N((function(e){return!e}))}),[k]),B=(0,i.useCallback)((function(){R(!T),null==g||g(),_((function(e){return!e}))}),[g,R,T]);return(0,i.useEffect)((function(){var e=function(e){"mouse"===e.pointerType&&(F(),L(!0))},t=function(e){var t,n;F(),(null===(n=null===(t=e.target)||void 0===t?void 0:t.closest)||void 0===n?void 0:n.call(t,".bookOsdRow"))||L((function(e){return!e}))};return F(),document.addEventListener("pointermove",e),document.addEventListener("click",t),function(){clearTimeout(w.current),R(!1),document.removeEventListener("pointermove",e),document.removeEventListener("click",t)}}),[F,R]),(0,o.jsxs)("div",{className:"bookOsd",children:[(0,o.jsxs)("div",{className:"bookOsdRow",style:s({paddingTop:"env(safe-area-inset-top)"},!P&&{opacity:0,pointerEvents:"none"}),children:[(0,o.jsx)(l.A,{onClick:n,icon:"arrow_back",title:r.Ay.translate("ButtonBack")}),(0,o.jsx)("span",{className:"bookOsdTitle",children:t.Name})]}),(0,o.jsxs)("div",{className:"bookOsdRow",style:s({paddingBottom:"env(safe-area-inset-bottom)"},!P&&{opacity:0,pointerEvents:"none"}),children:[(0,o.jsx)(l.A,{onClick:f,icon:"navigate_before",title:r.Ay.translate("Previous")}),(0,o.jsx)(l.A,{onClick:d,icon:"navigate_next",title:r.Ay.translate("Next")}),(0,o.jsx)("div",{className:"bookOsdSpacer"}),v&&(0,o.jsx)(l.A,{onClick:v,icon:"toc",title:r.Ay.translate("TableOfContents")}),p&&(0,o.jsx)(l.A,{onClick:p,icon:"remove_red_eye",title:r.Ay.translate("LabelTheme")}),b&&(0,o.jsx)(l.A,{onClick:b,icon:"text_decrease",title:r.Ay.translate("Smaller")}),y&&(0,o.jsx)(l.A,{onClick:y,icon:"text_increase",title:r.Ay.translate("Larger")}),m&&(0,o.jsx)(l.A,{onClick:V,icon:A?"arrow_circle_left":"arrow_circle_right",title:r.Ay.translate(A?"ViewRightToLeft":"ViewLeftToRight")}),k&&(0,o.jsx)(l.A,{onClick:D,icon:O?"import_contacts":"devices_fold",title:r.Ay.translate(O?"ViewDoublePage":"ViewSinglePage")}),(c.A.isEnabled||window.NativeShell)&&(0,o.jsx)(l.A,{onClick:B,icon:T?"fullscreen_exit":"fullscreen",title:r.Ay.translate(T?"ExitFullscreen":"Fullscreen")})]})]})}}}]);