"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("react"),n=require("semantic-ui-react"),l=()=>{const[r,t]=s.useState(!1);s.useEffect(()=>{const o=()=>{window.pageYOffset>150?t(!0):t(!1)};return window.addEventListener("scroll",o),()=>{window.removeEventListener("scroll",o)}},[window.scroll]);const i=()=>{document.body.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})};return e.jsx(e.Fragment,{children:r&&e.jsx("div",{id:"top-navigator",className:"top-navigator",children:e.jsx(n.Menu,{children:e.jsx(n.Menu.Item,{onClick:i,children:"Back to the top"})})})})};exports.default=l;
