1import{r as h,R as d,j as e}from"./vendor-wagmi-CRHMQcRy.js";import{a5 as N,B as F,I as k,a6 as E,a7 as S,a8 as w,a9 as H,aa as z,ab as R,ac as M,H as O,f as p}from"./index-CjDX1y09.js";const A=h.memo(({children:j,footer:i,hideCastButton:l=!1,hideBorderBottom:y=!1,visibleOnMobile:b=!1,composeSearchParams:s,composerDefaultIntent:o,renderAlternateActionButton:f,dynamicFooterHeight:g=!1,iconRight:u})=>{const c=N(),{trackEvent:v}=F(),n=k(),C=E(),{hasBackgroundedSession:t,openComposer:a,resumeComposer:x}=S(),[I,r]=h.useState(!1);d.useEffect(()=>{r(!1)},[C.pathname]);const m=d.useMemo(()=>typeof s<"u"?s:o,[s,o]);return w("n",()=>{if(t){x();return}l||a({intent:m,isIntentFromSearchParams:!!s,onClose:()=>{typeof s<"u"&&n({to:"homeFeed",params:{}})}})}),d.useEffect(()=>{typeof s<"u"&&a({intent:s,isIntentFromSearchParams:!0,onClose:()=>{n({to:"homeFeed",params:{}})}})},[s,n,a]),e.jsxs("nav",{className:p("sticky top-0 z-10 flex-col border-b-0 bg-app border-default",typeof i<"u"&&!g?"h-14 sm:h-28":"sm:border-b",y&&"sm:border-b-0"),children:[e.jsx("div",{className:p(b?"flex px-4":"hidden sm:flex sm:px-4","h-14 flex-row items-center justify-between"),children:I?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>r(!1),className:"flex shrink-0 items-center justify-center rounded-lg p-1.5 hover:bg-overlay-faint","aria-label":"Close search",children:e.jsx(H,{size:18,className:"text-default"})}),e.jsx("div",{className:"flex-1 px-2",children:e.jsx(z,{showClearIcon:!0,autoFocus:!0})})]}):e.jsxs(e.Fragment,{children:[j,e.jsxs("div",{className:"hidden flex-row items-center space-x-2 sm:flex",children:[typeof f=="function"&&f({userIsSignedIn:c}),e.jsx("button",{onClick:()=>r(!0),className:"flex items-center justify-center rounded-lg p-1.5 hover:bg-overlay-faint mdlg:hidden","aria-label":"Search",children:e.jsx(R,{size:18,className:"text-default"})}),c&&(!l||t)&&e.jsx(M,{onClick:()=>{if(t){x();return}v(O.AddCastModalShown,void 0),a({intent:m,isIntentFromSearchParams:!!s,onClose:()=>{typeof s<"u"&&n({to:"homeFeed",params:{}})}})},children:t?"Resume":"Cast"})]}),typeof u<"u"&&u]})}),i&&e.jsx("div",{children:i})]})});A.displayName="PageHeader";export{A as P};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.