import{n as e,p as t,t as n}from"./createLucideIcon-XxmMb-o2.js";var r=n(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),i=!1;t.on(`navigate`,()=>{i=!0});function a(e=`/donors`){i?window.history.back():t.get(e)}var o=e();function s({title:e,back:t=!0,backHref:n=`/donors`,action:i}){return(0,o.jsx)(`div`,{className:`sticky top-0 z-20 border-b border-line bg-white`,children:(0,o.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-3`,children:[t&&(0,o.jsx)(`button`,{type:`button`,onClick:()=>a(n),"aria-label":`Go back`,className:`flex h-9 w-9 items-center justify-center rounded-full hover:bg-line-soft`,children:(0,o.jsx)(r,{className:`h-5 w-5 text-ink`,"aria-hidden":`true`})}),(0,o.jsx)(`h1`,{className:`text-[16px] font-semibold`,children:e}),i&&(0,o.jsx)(`div`,{className:`ml-auto`,children:i})]})})}export{s as t};