import{d as e,n as t,t as n}from"./objectSpread2-DtFdQpqy.js";import{a as r,n as i}from"./preload-helper-EQ20WQt-.js";import{P as a,V as o,c as s,l as c}from"./prop-types-DdDwMzX7.js";import{lt as l}from"./poll-UAe1CGVf.js";import{Ci as u,Do as d,Eo as f,Qi as p,hi as m}from"./time-C7shVqCd.js";import{t as h}from"./helmet-xJbX5x_5.js";import{n as g}from"./short_number-CCNBtmoH.js";import{t as _}from"./column-CvSGioVA.js";import{cn as v}from"./status_quoted-CRoil4HW.js";import{f as y}from"./account-DP5xh-2e.js";import{S as b,b as x,l as S,s as C}from"./navigation_panel-DzT5nPmp.js";import{n as w,r as T}from"./navigation_bar-ByKl1gYe.js";import{a as E}from"./columns_area-DbT75EJ-.js";import{t as D}from"./compose_form_container-LvyBudlk.js";import{t as O}from"./edit_square-IYyVVyPX.js";import{t as k}from"./elephant_ui_plane-CafQEYi0.js";var A=e(r()),j=i();t();var M=e=>(0,j.jsx)(`svg`,n(n({xmlns:`http://www.w3.org/2000/svg`,height:24,viewBox:`0 -960 960 960`,width:24},e),{},{children:(0,j.jsx)(`path`,{d:`M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h280v80H200Zm440-160-55-58 102-102H360v-80h327L585-622l55-58 200 200-200 200Z`})})),N=s({live_feed_public:{id:`navigation_bar.live_feed_public`,defaultMessage:`Live feed (public)`},live_feed_local:{id:`navigation_bar.live_feed_local`,defaultMessage:`Live feed (local)`},preferences:{id:`navigation_bar.preferences`,defaultMessage:`Preferences`},logout:{id:`navigation_bar.logout`,defaultMessage:`Logout`}}),P=({multiColumn:e})=>{let t=c(),n=f(),r=d(e=>e.settings.get(`columns`));(0,A.useEffect)(()=>(n(m()),()=>{n(u())}),[n]);let i=(0,A.useCallback)(e=>(e.preventDefault(),e.stopPropagation(),n(p({modalType:`CONFIRM_LOG_OUT`,modalProps:{}})),!1),[n]),s=(0,A.useCallback)(()=>{let e=document.querySelector(`.navigation-panel`);e==null||e.scrollIntoView({behavior:o?`auto`:`smooth`})},[]);return e?(0,j.jsxs)(`div`,{className:`drawer`,role:`region`,"aria-label":t.formatMessage(w.publish),children:[(0,j.jsxs)(`nav`,{className:`drawer__header`,children:[(0,j.jsx)(g,{to:`/getting-started`,className:`drawer__tab`,title:t.formatMessage(w.menu),"aria-label":t.formatMessage(w.menu),onClick:s,children:(0,j.jsx)(l,{id:`bars`,icon:T})}),!r.some(e=>e.get(`id`)===`HOME`)&&(0,j.jsx)(g,{to:`/home`,className:`drawer__tab`,title:t.formatMessage(w.home),"aria-label":t.formatMessage(w.home),children:(0,j.jsx)(l,{id:`home`,icon:b})}),!r.some(e=>e.get(`id`)===`NOTIFICATIONS`)&&(0,j.jsx)(g,{to:`/notifications`,className:`drawer__tab`,title:t.formatMessage(w.notifications),"aria-label":t.formatMessage(w.notifications),children:(0,j.jsx)(l,{id:`bell`,icon:x})}),!r.some(e=>e.get(`id`)===`COMMUNITY`)&&(0,j.jsx)(g,{to:`/public/local`,className:`drawer__tab`,title:t.formatMessage(N.live_feed_local),"aria-label":t.formatMessage(N.live_feed_local),children:(0,j.jsx)(l,{id:`users`,icon:y})}),!r.some(e=>e.get(`id`)===`PUBLIC`)&&(0,j.jsx)(g,{to:`/public`,className:`drawer__tab`,title:t.formatMessage(N.live_feed_public),"aria-label":t.formatMessage(N.live_feed_public),children:(0,j.jsx)(l,{id:`globe`,icon:v})}),(0,j.jsx)(`a`,{href:`/settings/preferences`,className:`drawer__tab`,title:t.formatMessage(N.preferences),"aria-label":t.formatMessage(N.preferences),children:(0,j.jsx)(l,{id:`cog`,icon:S})}),(0,j.jsx)(`a`,{href:`/auth/sign_out`,className:`drawer__tab`,title:t.formatMessage(N.logout),"aria-label":t.formatMessage(N.logout),onClick:i,children:(0,j.jsx)(l,{id:`sign-out`,icon:M})})]}),(0,j.jsx)(C,{singleColumn:!1}),(0,j.jsx)(`div`,{className:`drawer__pager`,children:(0,j.jsxs)(`div`,{className:`drawer__inner`,children:[(0,j.jsx)(D,{}),(0,j.jsx)(`div`,{className:`drawer__inner__mastodon with-zig-zag-decoration`,children:(0,j.jsx)(`img`,{alt:``,draggable:`false`,src:a==null?k:a})})]})})]}):(0,j.jsxs)(_,{bindToDocument:!e,label:t.formatMessage(w.publish),children:[(0,j.jsx)(E,{icon:`pencil`,iconComponent:O,title:t.formatMessage(w.publish),multiColumn:e,showBackButton:!0}),(0,j.jsx)(`div`,{className:`scrollable`,children:(0,j.jsx)(D,{})}),(0,j.jsx)(h,{children:(0,j.jsx)(`meta`,{name:`robots`,content:`noindex`})})]})};export{P as default};
//# sourceMappingURL=compose-CfV5OhR-.js.map