module.exports=[59564,a=>{"use strict";let b=(0,a.i(70106).default)("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);a.s(["PlusCircle",()=>b],59564)},98091,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);a.s(["default",()=>b])},9804,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(40695),e=a.i(98091),e=e,f=a.i(5784),g=a.i(71630),h=a.i(45404),i=a.i(23292);function j({questionId:a,initialUpvotes:j}){let[k,l]=(0,c.useState)(j),[m,n]=(0,c.useState)(!1),{user:o}=(0,h.useAuth)(),p=async b=>{if(!o)return void i.toast.error("Please log in to vote");n(!0);try{await (0,g.fetchApi)("forum.php",{method:"PUT",body:JSON.stringify({question_id:a,vote_type:b})}),l(a=>"up"===b?a+1:a-1),i.toast.success("Vote recorded")}catch(a){i.toast.error(a.message||"Failed to record vote")}finally{n(!1)}};return(0,b.jsxs)("div",{className:"w-12 sm:w-16 bg-muted/20 flex flex-col items-center py-4 gap-1 border-r",children:[(0,b.jsx)(d.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:text-primary",onClick:()=>p("up"),disabled:m,children:(0,b.jsx)(e.default,{className:"h-6 w-6"})}),(0,b.jsx)("span",{className:"font-bold text-sm",children:k}),(0,b.jsx)(d.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:text-destructive",onClick:()=>p("down"),disabled:m,children:(0,b.jsx)(f.ChevronDown,{className:"h-6 w-6"})})]})}a.s(["VoteButtons",()=>j],9804)},90883,a=>{"use strict";var b=a.i(87924),c=a.i(40695),d=a.i(59564),e=a.i(38246),f=a.i(45404);function g(){let{user:a}=(0,f.useAuth)();return(0,b.jsx)(c.Button,{size:"lg",className:"gap-2 shadow-lg",asChild:!0,children:(0,b.jsxs)(e.default,{href:a?"/forum/ask":"/login?callbackUrl=/forum/ask",children:[(0,b.jsx)(d.PlusCircle,{className:"h-5 w-5"}),"Ask a Question"]})})}a.s(["AskQuestionButton",()=>g])}];

//# sourceMappingURL=_c464061e._.js.map