1import{j as e,bG as I,v as Se,bH as Z,aa as X,av as he,x as Te,y as Fe,aR as Ee,ag as We,bI as He,aO as Ye,E as Ze}from"./vendor-ui-CRYR7MMm.js";import{r as i}from"./vendor-react-BakMg_m9.js";import{L as Xe}from"./Layout-DEDvS-wN.js";import{g as Je,f as Qe,s as g,B as C}from"./index-DpQy9o5z.js";import{C as k,a as R,b as W,c as fe,d as H,e as et}from"./card-Dbtom7SE.js";import{L}from"./label-lfewAljI.js";import{T as J}from"./textarea-NNwQYOE1.js";import{B as Ae}from"./avatar-3ELMs_Mo.js";import{S as be,a as ve,b as je,c as ye,d as Ne}from"./select-cW4nfWIz.js";import"./Navbar-DLaBS_dl.js";import"./vendor-animation-D2dElwfF.js";import"./theme-toggle-DV4rTVDC.js";import"./index-CeWgTppK.js";import"./index-MgnT20fi.js";import"./input-Buglg5pE.js";import"./ceka-loader-Bm2GfrLZ.js";import"./BottomNavbar-CMfMd3S-.js";import"./NasakaAd-D5SXJ-vQ.js";import"./vendor-charts-DWKR9AS5.js";const Q=[{value:"general",label:"General Feedback"},{value:"bug",label:"Report a Bug"},{value:"content",label:"Content Suggestion"},{value:"other",label:"Other"}],Y=["All","Design","Bill Tracker","Mobile App","Nasaka Map","Translations","Accessibility","General"],we={future:{label:"Future",variant:"outline",icon:e.jsx(Ze,{className:"h-3 w-3"})},planned:{label:"Planned",variant:"secondary",icon:e.jsx(I,{className:"h-3 w-3"})},building:{label:"Building now",variant:"default",icon:e.jsx(Ye,{className:"h-3 w-3"})},beta:{label:"Beta",variant:"secondary",icon:e.jsx(He,{className:"h-3 w-3"})},completed:{label:"Shipped â",variant:"default",icon:e.jsx(We,{className:"h-3 w-3"})}},_e={low:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300",medium:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",high:"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"};function tt(s){return s?s.split(" ").slice(0,2).map(n=>n[0]).join("").toUpperCase():"?"}function st(s){const n=Date.now()-new Date(s).getTime(),r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const d=Math.floor(r/60);return d<24?`${d}h ago`:`${Math.floor(d/24)}d ago`}function Ce(s){return`KSh ${s.toLocaleString("en-KE")}`}function Le({name:s,src:n,size:r=8}){const d=`h-${r} w-${r} rounded-full flex-shrink-0`;return n?e.jsx("img",{src:n,alt:s??"",className:`${d} object-cover`}):e.jsx("div",{className:`${d} bg-muted flex items-center justify-center text-xs font-bold text-muted-foreground`,children:tt(s)})}function at({count:s,active:n,onToggle:r,loading:d}){return e.jsxs("button",{type:"button",onClick:p=>{p.stopPropagation(),d||r()},"aria-pressed":n,"aria-label":n?"Remove upvote":"Upvote this feature",className:["flex flex-col items-center justify-center gap-1 w-16 flex-shrink-0 py-3 rounded-xl","transition-all duration-150 select-none focus-visible:ring-2 focus-visible:ring-ring",n?"bg-amber-50 dark:bg-amber-950/40 ring-2 ring-amber-400 dark:ring-amber-500":"bg-muted/60 ring-1 ring-border hover:bg-muted",d?"opacity-60 cursor-not-allowed":"cursor-pointer"].join(" "),children:[e.jsx("svg",{width:20,height:17,viewBox:"0 0 20 17",fill:"none",className:`transition-transform duration-200 ${n?"scale-110":""}`,style:{fill:n?"#d97706":"transparent",stroke:n?"#d97706":"currentColor",strokeWidth:2,strokeLinejoin:"round"},children:e.jsx("path",{d:"M10 1L19 16H1L10 1Z"})}),e.jsx("span",{className:`text-base font-black tabular-nums leading-none ${n?"text-amber-600 dark:text-amber-400":"text-foreground"}`,children:s}),e.jsx("span",{className:`text-[9px] font-bold uppercase tracking-widest ${n?"text-amber-500":"text-muted-foreground"}`,children:n?"Voted":"Vote"})]})}function rt({goal:s,raised:n}){const r=s>0?Math.min(100,Math.round(n/s*100)):0;return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{children:[Ce(n)," raised of ",Ce(s)]}),e.jsxs("span",{className:"font-bold text-foreground",children:[r,"%"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-amber-500 transition-all duration-700",style:{width:`${r}%`}})})]})}function nt({feature:s,onToggleUpvote:n,upvoteLoading:r,onAddComment:d,c
1ommentSubmitting:p,canComment:x,currentUserId:y}){const[S,E]=i.useState(!1),[T,N]=i.useState(""),M=()=>{const l=T.trim();l&&(d(s.id,l),N(""))},w=we[s.status]??we.future;return e.jsxs(k,{className:"overflow-hidden transition-shadow hover:shadow-md",children:[e.jsxs("div",{className:"flex gap-3 p-4 cursor-pointer",onClick:()=>E(l=>!l),role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),E(_=>!_))},"aria-expanded":S,children:[e.jsx(at,{count:s.upvote_count,active:s.viewer_has_upvoted,onToggle:()=>n(s.id),loading:r}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("h3",{className:"font-semibold text-base leading-snug mb-2 flex items-center gap-2",children:[s.title,y&&s.user_id===y&&e.jsx("span",{className:"text-[10px] font-bold px-1.5 py-0.5 rounded-full bg-primary/10 text-primary shrink-0",children:"Your suggestion"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(Ae,{variant:w.variant,className:"flex items-center gap-1 text-[10px]",children:[w.icon,w.label]}),e.jsxs("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full ${_e[s.complexity]??_e.medium}`,children:["Effort: ",s.complexity[0]?.toUpperCase(),s.complexity.slice(1)]}),s.county&&e.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-muted-foreground",children:[e.jsx(Fe,{className:"h-3 w-3"}),s.county]}),e.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-muted-foreground ml-auto",children:[e.jsx(Se,{className:"h-3 w-3"}),s.comments.length]}),e.jsx(Ee,{className:`h-4 w-4 text-muted-foreground flex-shrink-0 transition-transform duration-200 ${S?"rotate-180":""}`})]})]})]}),S&&e.jsxs("div",{className:"border-t px-4 pb-4 pt-3 space-y-3",children:[s.description&&e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:s.description}),s.tags?.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.tags.map(l=>e.jsx("span",{className:"text-[11px] font-semibold px-2 py-0.5 rounded bg-muted text-kenya-green",children:l},l))}),s.funding_goal>0&&e.jsx(rt,{goal:s.funding_goal,raised:s.funding_raised}),e.jsx(C,{variant:"outline",size:"sm",className:"w-full",asChild:!0,children:e.jsxs("a",{href:`/donate?feature=${s.id}`,children:[e.jsx(Te,{className:"mr-2 h-4 w-4 text-red-500"}),"Support this feature"]})}),s.comments.length>0&&e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Comments"}),s.comments.map((l,_)=>e.jsxs("div",{className:`flex gap-2 pt-2 ${_>0?"border-t":""}`,children:[e.jsx(Le,{name:l.profiles?.full_name,src:l.profiles?.avatar_url,size:7}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs font-bold",children:l.profiles?.full_name??"Community Member"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:l.text})]})]},l.id))]}),s.comments.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"No comments yet â be the first to weigh in."}),x?e.jsxs("div",{className:"flex gap-2 pt-1",children:[e.jsx(J,{value:T,onChange:l=>N(l.target.value),placeholder:"Add a commentâ¦",rows:2,maxLength:1e3,className:"resize-none text-sm",onClick:l=>l.stopPropagation()}),e.jsx(C,{type:"button",size:"sm",className:"self-end shrink-0",disabled:p||!T.trim(),onClick:l=>{l.stopPropagation(),M()},children:p?e.jsx(Z,{className:"h-4 w-4 animate-spin"}):e.jsx(X,{className:"h-4 w-4"})})]}):e.jsx("p",{className:"text-xs text-muted-foreground pt-1",children:"Sign in to leave a comment."})]})]})}function it({entry:s}){const[n,r]=i.useState(!1),d=s.profiles?.full_name??"Community Member",p=Q.find(x=>x.value===s.category)?.label??s.category??"General Feedback";return e.jsx(k,{children:e.jsxs("div",{className:"flex gap-3 p-4 cursor-pointer",onClick:()=>r(x=>!x),role:"button",tabIndex:0,"aria-expanded":n,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),r(y=>!y))},children:[e.jsx(Le,{name:d,src:s.profiles?.avatar_url,size:9}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[e.jsx("span",{className:"text-sm font-bold",children:d}),s.profiles?.county&&e.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-0.5",children:[e.jsx(Fe,{className:"h-3 w-3"}),s.profiles.county]}),e.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:st(s.created_at)})]}),e.jsx("p",{className:`text-sm text-muted-foreground leading-relaxed ${n?"":"line-clamp-2"}`,children:s.message}),e.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[e.jsx(Ae,{variant:"secondary",className:"text-[10px]",children:p}),e.jsx(Ee,{className:`h-3.5 w-3.5 text-muted-foreground ml-auto flex-shrink-0 transition-transform ${n?"rotate-180":""}`})]})]})]})})}function ke({categories:s,active:n,onSelect:r}){return e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1 mb-4 no-scrollbar",children:s.map(d=>e.jsx("button",{type:"button",onClick:()=>r(d),className:["flex-shrink-0 text-xs font-semibold px-3.5 py-1.5 rounded-full transition-colors",n===d?"bg-kenya-green text-white":"bg-muted text-muted-foreground hover:bg-muted/80"].join(" "),children:d},d))})}const kt=()=>{const{toast:s}=Je(),{session:n}=Qe(),r=n?.user?.id??null,d=r?{id:r,full_name:n?.user?.user_metadata?.full_name??null,avatar_url:n?.user?.user_metadata?.avatar_url??null,county:null}:null,[p,x]=i.useState(""),[y,S]=i.useState("general"),[E,T]=i.useState(!1),[N,M]=i.useState(""),[w,l]=i.useState(""),[_,D]=i.useState(Y[1]),[ee,te]=i.useState(!1),[se,ae]=i.useState([]),[Me,q]=i.useState(!1),[O,B]=i.useState(""),[f,re]=i.useState("board"),[$,b]=i.useState([]),[P,ne]=i.useState("All"),[De,ie]=i.useState(!0),[oe,le]=i.useState(null),[qe,de]=i.useState(null),[Be,ce]=i.useState(null),G=i.useMemo(()=>{const t=new Set(Y.filter(a=>a!=="All"));return $.forEach(a=>a.category&&t.add(a.category)),se.forEach(a=>t.add(a)),Array.from(t).sort()},[$,se]),K=i.useCallback(t=>{const a=t.trim();return G.find(c=>c.toLowerCase()===a.toLowerCase())??a},[G]),[ue,$e]=i.useState([]),[A,Pe]=i.useState("All"),[Ge,me]=i.useState(!1),[xe,ge]=i.useState(null),V=i.useCallback(async t=>{ie(!0),le(null);try{let a=g.from("feature_requests").select("id,user_id,title,de
1scription,category,tags,county,status,shipped_at,complexity,funding_goal,funding_raised,created_at").order("created_at",{ascending:!1}).limit(50);t!=="All"&&(a=a.eq("category",t));const{data:o,error:c}=await a;if(c)throw c;if(!o||o.length===0){b([]);return}const h=o.map(u=>u.id),[{data:m},{data:v},{data:j}]=await Promise.all([g.from("feature_upvotes").select("feature_id").in("feature_id",h),r?g.from("feature_upvotes").select("feature_id").in("feature_id",h).eq("user_id",r):Promise.resolve({data:[]}),g.from("feature_comments").select("id,feature_id,text,created_at,profiles:user_id(id,full_name,avatar_url)").in("feature_id",h).order("created_at",{ascending:!0})]),F=new Map;for(const u of m??[])F.set(u.feature_id,(F.get(u.feature_id)??0)+1);const Ve=new Set((v??[]).map(u=>u.feature_id)),U=new Map;for(const u of j??[])U.has(u.feature_id)||U.set(u.feature_id,[]),U.get(u.feature_id).push(u);const pe=o.map(u=>({...u,upvote_count:F.get(u.id)??0,viewer_has_upvoted:Ve.has(u.id),comments:U.get(u.id)??[]}));pe.sort((u,Re)=>Re.upvote_count-u.upvote_count),b(pe)}catch(a){le(a?.message??"Failed to load feature requests.")}finally{ie(!1)}},[r]),z=i.useCallback(async t=>{me(!0),ge(null);try{let a=g.from("feedback").select("id,user_id,message,category,status,created_at,profiles:user_id(id,full_name,avatar_url,county)").eq("source","ceka").order("created_at",{ascending:!1}).limit(60);t!=="All"&&(a=a.eq("category",t==="General Feedback"?"general":t.toLowerCase().replace(" ","_")));const{data:o,error:c}=await a;if(c)throw c;$e(o??[])}catch(a){ge(a?.message??"Failed to load community feedback.")}finally{me(!1)}},[]);i.useEffect(()=>{V(P)},[P,V]),i.useEffect(()=>{f==="feed"&&z(A)},[f,A,z]);const Ke=i.useCallback(async t=>{if(!r){s({title:"Sign in to upvote",variant:"destructive"});return}b(a=>a.map(o=>{if(o.id!==t)return o;const c=o.viewer_has_upvoted;return{...o,viewer_has_upvoted:!c,upvote_count:c?o.upvote_count-1:o.upvote_count+1}})),de(t);try{const{data:a}=await g.from("feature_upvotes").select("feature_id").eq("feature_id",t).eq("user_id",r).maybeSingle();a?await g.from("feature_upvotes").delete().eq("feature_id",t).eq("user_id",r):await g.from("feature_upvotes").insert({feature_id:t,user_id:r})}catch{b(a=>a.map(o=>{if(o.id!==t)return o;const c=o.viewer_has_upvoted;return{...o,viewer_has_upvoted:!c,upvote_count:c?o.upvote_count-1:o.upvote_count+1}}))}finally{de(null)}},[r,s]),ze=i.useCallback(async(t,a)=>{if(!r){s({title:"Sign in to comment",variant:"destructive"});return}const o=`temp-${Date.now()}`,c={id:o,feature_id:t,text:a,created_at:new Date().toISOString(),profiles:d};b(h=>h.map(m=>m.id===t?{...m,comments:[...m.comments,c]}:m)),ce(t);try{const{data:h,error:m}=await g.from("feature_comments").insert({feature_id:t,user_id:r,text:a}).select("id,feature_id,text,created_at,profiles:user_id(id,full_name,avatar_url)").single();if(m)throw m;b(v=>v.map(j=>j.id===t?{...j,comments:j.comments.map(F=>F.id===o?h:F)}:j))}catch(h){b(m=>m.map(v=>v.id===t?{...v,comments:v.comments.filter(j=>j.id!==o)}:v)),s({title:"Comment failed to post",description:h?.message,variant:"destructive"})}finally{ce(null)}},[r,d,s]),Ue=i.useCallback(async t=>{if(t.preventDefault(),!N.trim()){s({title:"Title required",description:"Give your suggestion a short title.",variant:"destructive"});return}if(!r){s({title:"Sign in required",description:"Please sign in to suggest a feature.",variant:"destructive"});return}te(!0);try{const{data:a,error:o}=await g.from("feature_requests").insert({user_id:r,title:N.trim(),description:w.trim()||null,category:K(_),tags:[],county:d?.county??null,status:"future",complexity:"medium",funding_goal:0,funding_raised:0}).select("id,user_id,title,description,category,tags,county,status,shipped_at,complexity,funding_goal,funding_raised,created_at").single();if(o)throw o;const{error:c}=await g.from("feature_upvotes").insert({feature_id:a.id,user_id:r});if(c)throw c;const h={...a,upvote_count:1,viewer_has_upvoted:!0,comments:[]};b(m=>[h,...m]),ne("All"),M(""),l(""),D(Y[1]),s({title:"Suggestion posted",description:"Your vote has been counted â share it to get more."})}catch(a){s({title:"Failed to post suggestion",description:a?.message,variant:"destructive"})}finally{te(!1)}},[N,w,_,r,d,s,K]),Ie=async t=>{if(t.preventDefault(),!p.trim()){s({title:"Message required",description:"Please write your message.",variant:"destructive"});return}if(!r){s({title:"Sign in required",description:"Please sign in to submit feedback.",variant:"destructive"});return}T(!0);try{const{error:a}=await g.from("feedback").insert({user_id:r,message:p.trim(),category:y,status:"pending",source:"ceka"});if(a)throw a;
1s({title:"Feedback submitted",description:"Thank you! The developer will review it soon."}),x(""),S("general"),f==="feed"&&z(A)}catch(a){s({title:"Submission failed",description:a.message,variant:"destructive"})}finally{T(!1)}},Oe=["All",...Q.map(t=>t.label)];return e.jsx(Xe,{children:e.jsxs("div",{className:"container py-8 md:py-12 max-w-4xl",children:[e.jsx("p",{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest mb-2",children:"Features · Feedback"}),e.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-2",children:"Shape what we build"}),e.jsx("p",{className:"text-muted-foreground mb-8 text-sm md:text-base",children:"Vote on features you want, or write directly to the CEKA Tech team. Everything is reviewed regularly."}),e.jsxs("div",{className:"flex gap-2 mb-6",children:[e.jsxs("button",{type:"button",onClick:()=>re("board"),className:["flex-1 flex items-center gap-2 justify-center px-4 py-3 rounded-xl text-sm font-semibold transition-colors",f==="board"?"bg-secondary text-secondary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"].join(" "),children:[e.jsx(I,{className:"h-3.5 w-3.5",style:{fill:"currentColor"},strokeWidth:2.25}),"Suggest & vote"]}),e.jsxs("button",{type:"button",onClick:()=>re("feed"),className:["flex-1 flex items-center gap-2 justify-center px-4 py-3 rounded-xl text-sm font-semibold transition-colors",f==="feed"?"bg-kenya-green text-white":"bg-muted text-muted-foreground hover:bg-muted/80"].join(" "),children:[e.jsx(Se,{className:"h-4 w-4"}),"General feedback"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-6 -mt-3",children:f==="board"?"Feature ideas only â vote on what should get built next.":"Bugs, comments, and anything that isnât a feature request."}),f==="board"?e.jsxs(k,{className:"mb-8",children:[e.jsxs(R,{children:[e.jsxs(W,{className:"flex items-center gap-2",children:[e.jsx(I,{className:"h-4 w-4 text-secondary",style:{fill:"currentColor"},strokeWidth:2.25}),"Suggest a feature"]}),e.jsx(fe,{children:"Goes straight onto the board below, and your vote is counted automatically."})]}),e.jsx(H,{children:e.jsxs("form",{onSubmit:Ue,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(L,{htmlFor:"suggestTitle",children:"Title"}),e.jsx("input",{id:"suggestTitle",name:"title",placeholder:"e.g. Audio summaries for the Finance Bill",value:N,onChange:t=>M(t.target.value),maxLength:140,className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(L,{htmlFor:"suggestCategory",children:"Category"}),e.jsxs(be,{name:"suggestCategory",value:_,onValueChange:D,children:[e.jsx(ve,{id:"suggestCategory",children:e.jsx(je,{placeholder:"Select a category"})}),e.jsx(ye,{children:G.map(t=>e.jsx(Ne,{value:t,children:t},t))})]}),Me?e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("input",{autoFocus:!0,value:O,onChange:t=>B(t.target.value),placeholder:"New category name",maxLength:40,className:"flex h-9 w-full rounded-md border border-dashed border-secondary/60 bg-background px-3 py-1.5 text-sm",onKeyDown:t=>{if(t.key==="Enter"){t.preventDefault();const a=K(O);a&&(ae(o=>o.includes(a)?o:[...o,a]),D(a)),q(!1),B("")}t.key==="Escape"&&(q(!1),B(""))},onBlur:()=>{const t=K(O);t&&(ae(a=>a.includes(t)?a:[...a,t]),D(t)),q(!1),B("")}})}):e.jsx("button",{type:"button",onClick:()=>q(!0),className:"text-xs font-medium text-secondary hover:underline",children:"+ Add a new category"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(L,{htmlFor:"suggestDescription",children:"Short Description"}),e.jsx(J,{id:"suggestDescription",name:"description",placeholder:"What should this do, and who does it help?",value:w,onChange:t=>l(t.target.value),rows:3,className:"resize-none",maxLength:2e3})]}),e.jsx(C,{type:"submit",className:"w-full bg-secondary hover:bg-secondary/90 text-secondary-foreground",disabled:ee||!n,children:ee?e.jsxs(e.Fragment,{children:[e.jsx(Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Postingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"mr-2 h-4 w-4",style:{fill:"currentColor"},strokeWidth:2.25}),"Post & auto-vote"]})}),!n&&e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Please sign in to suggest a feature."})]})})]}):e.jsxs(k,{className:"mb-8",children:[e.jsxs(R,{children:[e.jsxs(W,{className:"flex items-center gap-2",children:[e.jsx(X,{className:"h-4 w-4"}),"Write to Developer"]}),e.jsx(fe,{children:'Share feedback or report issues. Not for feature requests â use "Suggest & vote" for those.'})]}),e.jsx(H,{children:e.jsxs("form",{onSubmit:Ie,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(L,{htmlFor:"category",children:"Category"}),e.jsxs(be,{name:"category",value:y,onValueChange:S,children:[e.jsx(ve,{id:"category",children:e.jsx(je,{placeholder:"Select a category"})}),e.jsx(ye,{children:Q.map(t=>e.jsx(Ne,{value:t.value,children:t.label},t.value))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(L,{htmlFor:"message",children:"Your Message"}),e.jsx(J,{id:"message",name:"message",placeholder:"Share your thoughts, ideas, or report issuesâ¦",value:p,onChange:t=>x(t.target.value),rows:4,className:"resize-none",maxLength:4e3}),e.jsxs("p",{className:"text-xs text-muted-foreground text-right",children:[p.length,"/4000"]})]}),e.jsx(C,{type:"submit",className:"w-full bg-kenya-green hover:bg-kenya-green/90",disabled:E||!n,children:E?e.
1jsxs(e.Fragment,{children:[e.jsx(Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Submittingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"mr-2 h-4 w-4"}),"Submit Feedback"]})}),!n&&e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Please sign in to submit feedback."})]})})]}),f==="board"&&e.jsxs(e.Fragment,{children:[e.jsx(ke,{categories:["All",...G],active:P,onSelect:ne}),De?e.jsx("div",{className:"flex flex-col gap-3",children:[1,2,3].map(t=>e.jsx("div",{className:"h-20 rounded-xl bg-muted animate-pulse"},t))}):oe?e.jsxs(k,{className:"p-6 text-center space-y-2",children:[e.jsx(he,{className:"h-5 w-5 text-destructive mx-auto"}),e.jsx("p",{className:"text-sm font-semibold text-destructive",children:oe}),e.jsx(C,{variant:"link",size:"sm",onClick:()=>V(P),children:"Try again"})]}):$.length===0?e.jsx("p",{className:"text-center text-muted-foreground py-10 text-sm",children:"No feature requests in this category yet."}):e.jsx("div",{className:"flex flex-col gap-3",children:$.map(t=>e.jsx(nt,{feature:t,onToggleUpvote:Ke,upvoteLoading:qe===t.id,onAddComment:ze,commentSubmitting:Be===t.id,canComment:!!r,currentUserId:r},t.id))})]}),f==="feed"&&e.jsxs(e.Fragment,{children:[e.jsx(ke,{categories:Oe,active:A,onSelect:Pe}),Ge?e.jsx("div",{className:"flex flex-col gap-3",children:[1,2,3,4].map(t=>e.jsx("div",{className:"h-20 rounded-xl bg-muted animate-pulse"},t))}):xe?e.jsxs(k,{className:"p-6 text-center space-y-2",children:[e.jsx(he,{className:"h-5 w-5 text-destructive mx-auto"}),e.jsx("p",{className:"text-sm font-semibold text-destructive",children:xe}),e.jsx(C,{variant:"link",size:"sm",onClick:()=>z(A),children:"Try again"})]}):ue.length===0?e.jsx("p",{className:"text-center text-muted-foreground py-10 text-sm",children:"No submissions yet. Be the first!"}):e.jsx("div",{className:"flex flex-col gap-3",children:ue.map(t=>e.jsx(it,{entry:t},t.id))})]}),e.jsxs(k,{className:"mt-12",children:[e.jsx(R,{children:e.jsx(W,{children:"Developer's Note"})}
1),e.jsxs(H,{className:"prose dark:prose-invert max-w-none text-sm space-y-3",children:[e.jsx("p",{children:"Hello there! Thank you for taking the time to visit the CEKA platform. This civic engagement platform has been a labor of love, built with the goal of empowering Kenyan citizens to actively participate in their democracy."}),e.jsx("p",{children:"Your feedback is incredibly valuable in shaping the future of this platform. Every suggestion, bug report, or feature request helps us improve the experience for everyone."}),e.jsxs("p",{className:"font-medium",children:["With gratitude,",e.jsx("br",{}),"The CEKA Techie Team"]})]}),e.jsx(et,{className:"flex justify-center border-t pt-6",children:e.jsx(C,{variant:"outline",asChild:!0,children:e.jsxs("a",{href:"https://ko-fi.com/civiceducationkenya",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[e.jsx(Te,{className:"h-4 w-4 text-red-500"}),"Support This Project"]})})})]})]})})};export{kt as default};
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.