import{r as y,e as w,j as e,u as C}from"./vendor-react-CVHocMAO.js";import{u as N}from"./useSeo-BXYcILQx.js";import{l as B,k as S}from"./index-DXdAv5n3.js";import"./vendor-amplify-BttVyssp.js";import{h as H,H as k,R as A,g as F,b as L}from"./HelpCenterLayout-R8CHnbrz.js";import{A as j}from"./arrow-right-B6oF8gn-.js";import{m as a,A as R}from"./vendor-motion-CP2nHqR4.js";import"./vendor-radix-Boyzn9qx.js";import"./vendor-maps-BX5dXCaZ.js";import"./PageBreadcrumb-CkYp80xu.js";import"./wrench-DaAxYwBN.js";import"./trending-up-D1pV1qtR.js";import"./book-open-Ds9XczHM.js";import"./dollar-sign-BLKPzwbA.js";import"./shield-JErxfbmm.js";import"./credit-card-CvDNyM_h.js";const P=({initialQuery:r="",onSubmit:d,placeholder:m="Search support questions...",className:x,value:i,onChange:l})=>{const[h,u]=y.useState(r),t=w(),s=i!==void 0?i:h,p=l||u,c=n=>{n.preventDefault();const o=s.trim();o&&(d?d(o):t(`/help/search?q=${encodeURIComponent(o)}`))};return e.jsx("form",{onSubmit:c,className:x,children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-2 border border-gray-200 flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1 flex items-center gap-3 px-4",children:[e.jsx(B,{className:"w-5 h-5 text-[#4B4B4B] flex-shrink-0"}),e.jsx("input",{type:"text",value:s,onChange:n=>p(n.target.value),placeholder:m,className:"flex-1 bg-transparent border-none outline-none text-[#0F0F0F] placeholder:text-[#4B4B4B]/50 text-base md:text-lg py-2",style:{fontWeight:400}})]}),e.jsxs("button",{type:"submit",className:"h-12 px-6 md:px-8 rounded-xl bg-gradient-to-r from-brand-400 to-brand-500 hover:brightness-110 text-white shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 relative overflow-hidden font-medium text-base md:text-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-brand",style:{boxShadow:"0 8px 30px -8px rgba(249, 115, 22, 0.4)"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-white/20 to-transparent opacity-50 rounded-xl"}),e.jsxs("span",{className:"relative flex items-center gap-2",children:["Search",e.jsx(j,{className:"w-5 h-5"})]})]})]})})},U={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.08,delayChildren:.1}}},b={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.16,1,.3,1]}}},Q={hidden:{opacity:0,y:12,scale:.95},visible:{opacity:1,y:0,scale:1,transition:{duration:.5,ease:[.16,1,.3,1]}}},T={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.04,delayChildren:0}},exit:{opacity:0,transition:{duration:.15}}},_=()=>{const{user:r}=S(),d=w(),m=C();N({title:"Help Center | PLEC",description:"Get answers to common questions about booking venues, hosting events, and using the PLEC platform."});const x=()=>{var n,o,f,v;if(!r)return"";const t=(n=r.preferredName)==null?void 0:n.trim();if(t)return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();const s=(o=r.firstName)==null?void 0:o.trim();if(s)return s.charAt(0).toUpperCase()+s.slice(1).toLowerCase();const p=(v=(f=r.attributes)==null?void 0:f.name)==null?void 0:v.trim();if(p){const g=p.split(/\s+/).filter(Boolean)[0];if(g)return g.charAt(0).toUpperCase()+g.slice(1).toLowerCase()}const c=r.email?r.email.split("@")[0]:"";return c?c.charAt(0).toUpperCase()+c.slice(1).toLowerCase():""},i=y.useMemo(()=>{const t=m.pathname.split("/").filter(Boolean);if(t[0]==="help"&&t[1]){const s=t[1];if(s in H)return s}return"guest"},[m.pathname]),l=F(i),h=x(),u=t=>{d(L(i,t))};return e.jsx(k,{currentRole:i,hideRoleTabs:!0,children:e.jsxs(a.div,{variants:U,initial:"hidden",animate:"visible",children:[e.jsxs(a.div,{className:"text-center mb-6",variants:b,children:[e.jsxs("h1",{className:"text-[#0F0F0F] tracking-tight mb-4",style:{lineHeight:"1.2",fontWeight:700,fontSize:"clamp(2rem, 4vw, 3rem)"},children:["What can we help you with",h?`, ${h}`:"","?"]}),l.description&&e.jsx("p",{className:"text-[#4B4B4B] text-lg mt-2",children:l.description})]}),e.jsx(a.div,{className:"max-w-3xl mx-auto mb-10",variants:b,children:e.jsx(P,{placeholder:"Search support questions..."})}),e.jsx(a.div,{className:"mt-4 mb-10",variants:b,children:e.jsx(A,{currentRole:i})}),e.jsx(R,{mode:"wait",children:e.jsx(a.div,{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-6xl mx-auto mb-12",variants:T,initial:"hidden",animate:"visible",exit:"exit",children:l.topics.map(t=>{const s=t.icon;return e.jsx(a.button,{onClick:()=>u(t.id),className:"group relative bg-white border-2 border-gray-200 rounded-2xl p-6 text-left",variants:Q,whileHover:{scale:1.02,borderColor:"hsl(var(--brand-400))",boxShadow:"0 10px 30px -10px rgba(0, 0, 0, 0.1)",transition:{duration:.2,ease:"easeOut"}},whileTap:{scale:.98},children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(a.div,{className:"flex-shrink-0 w-12 h-12 rounded-xl bg-brand-50 flex items-center justify-center group/icon",whileHover:{backgroundColor:"hsl(var(--brand-400))",rotate:[0,-10,10,-10,0],transition:{duration:.5}},children:e.jsx(s,{className:"w-6 h-6 text-brand-400 group-hover:text-brand-600 group-hover/icon:text-white transition-colors"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-[#0F0F0F] font-semibold mb-2",style:{fontSize:"1.125rem",lineHeight:"1.4"},children:t.label}),e.jsx("p",{className:"text-[#4B4B4B] text-sm",style:{lineHeight:"1.5",letterSpacing:"-0.01em"},children:t.description})]}),e.jsx(a.div,{initial:{x:0},whileHover:{x:4},transition:{duration:.2},children:e.jsx(j,{className:"w-5 h-5 text-[#4B4B4B] group-hover:text-brand-400 transition-colors flex-shrink-0 mt-1"})})]})},t.id)})},i)})]})})};export{_ as default};