1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8862],{84695:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/feedback",function(){return s(45599)}])},56137:function(e,t,s){"use strict";s.d(t,{Z:function(){return n}});var a=s(85893),r=s(9008),l=s.n(r);function n(e){let{children:t}=e;return(0,a.jsxs)("div",{className:"min-h-screen bg-gray-100",children:[(0,a.jsx)(l(),{}),(0,a.jsx)("div",{className:"flex gap-2 min-h-screen",children:(0,a.jsx)("div",{className:"w-full",children:t})})]})}s(46252),s(51934),s(85069)},45599:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return u}});var a=s(85893),r=s(67294),l=s(11163),n=s(9008),o=s.n(n),i=s(56137),c=s(51934),d=s(37489);function u(){let e=(0,l.useRouter)(),{data:t,status:s}=(0,d.k)(),[n,u]=(0,r.useState)([]),[x,m]=(0,r.useState)([]),[b,h]=(0,r.useState)(!1),[g,p]=(0,r.useState)(null),[f,y]=(0,r.useState)([]),[j,v]=(0,r.useState)(""),[N,w]=(0,r.useState)({title:"",description:"",category:"",type:"Feature Request"}),[k,C]=(0,r.useState)({category:"All",status:"All",type:"All",sortBy:"trending"}),S=["All","AI Image Generation","AI Content Generation","Carousel Templates","Font & Typography","Colors & Design","Slides & Layout","LinkedIn Integration","Post Scheduling","Video Downloader","Text Formatter","Post Ideas","User Interface","Performance","Authentication","Other"];(0,r.useEffect)(()=>{D()},[]),(0,r.useEffect)(()=>{A()},[n,k]);let D=async()=>{try{let e=await fetch("/api/feedback?limit=100"),t=await e.json();t.success&&u(t.data)}catch(e){console.error("Error fetching feedbacks:",e)}},A=()=>{let e=[...n];switch("All"!==k.category&&(e=e.filter(e=>e.category===k.category)),"All"!==k.status&&(e=e.filter(e=>e.status===k.status)),"All"!==k.type&&(e=e.filter(e=>e.type===k.type)),k.sortBy){case"trending":e.sort((e,t)=>t.engagementScore-e.engagementScore);break;case"popular":e.sort((e,t)=>t.upvoteCount-e.upvoteCount);break;case"recent":e.sort((e,t)=>new Date(t.createdAt)-new Date(e.createdAt));break;case"comments":e.sort((e,t)=>t.commentCount-e.commentCount)}m(e)},B=async s=>{if(s.preventDefault(),!t){alert("Please sign in to submit feedback"),e.push("/signin");return}if(!N.title||!N.description||!N.category){alert("Please fill in all required fields");return}h(!0);try{let e=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(N)}),t=await e.json();t.success?(alert("Feedback submitted successfully! Thank you for your input."),w({title:"",description:"",category:"",type:"Feature Request"}),D()):alert(t.error||"Failed to submit feedback")}catch(e){console.error("Error submitting feedback:",e),alert("Failed to submit feedback")}finally{h(!1)}},F=async s=>{if(!t){alert("Please sign in to upvote"),e.push("/signin");return}try{let e=await fetch("/api/feedback/".concat(s,"/upvote"),{method:"POST",credentials:"include"});(await e.json()).success&&D()}catch(e){console.error("Error upvoting:",e)}},P=async e=>{p(e);try{let t=await fetch("/api/feedback/".concat(e._id,"/comments")),s=await t.json();s.success&&y(s.data)}catch(e){console.error("Error fetching comments:",e)}},L=async s=>{if(s.preventDefault(),!t){alert("Please sign in to comment"),e.push("/signin");return}if(j.trim())try{let e=await fetch("/api/feedback/".concat(g._id,"/comments"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({comment:j})});(await e.json()).success&&(v(""),P(g),D())}catch(e){console.error("Error adding comment:",e)}},R=e=>({Open:"bg-blue-100 text-blue-800","Under Review":"bg-yellow-100 text-yellow-800",Planned:"bg-purple-100 text-purple-800","In Progress":"bg-indigo-100 text-indigo-800",Completed:"bg-green-100 text-green-800",Declined:"bg-red-100 text-red-800"})[e]||"bg-gray-100 text-gray-800",_=e=>({"Feature Request":"\uD83D\uDCA1","Bug Report":"\uD83D\uDC1B",Improvement:"â¡",Question:"â"})[e]||"\uD83D\uDCDD",T=e=>{let t=new Date(e),s=(new Date-t)/36e5;if(s<24){let e=Math.floor(s);return 0===e?"Just now":"".concat(e,"h ago")}return s<168?"".concat(Math.floor(s/24),"d ago"):t.toLocaleDateString()};return"loading"===s?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,a.jsx)("div",{className:"text-xl",children:"Loading..."})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o(),{children:[(0,a.jsx)("title",{children:"Feedback & Feature Requests | PostBold"}),(0,a.jsx)("meta",{name:"description",content:"Share your feedback and feature requests to help us improve PostBold"})]}),(0,a.jsxs)(i.Z,{children:[(0,a.jsx)(c.Z,{}),(0,a.jsxs)("div",{className:"min-h-screen bg-gray-50 py-8",children:[(0,a.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,a.jsxs)("div",{className:"text-center mb-10",children:[(0,a.jsx)("h1",{className:"text-5xl font-bold text-gray-900 mb-5",children:"Feedback & Feature Requests"}),(0,a.jsx)("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto leading-relaxed",children:"Share your ideas and help us improve PostBold. Vote on features you'd like to see and discuss with the community."})]}),(0,a.jsx)("div",{className:"bg-white rounded-xl shadow-lg p-8 mb-8 border border-gray-100",children:t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsx)("h2",{className:"text-3xl font-bold text-gray-900",children:"Submit Your Feedback"}),(0,a.jsxs)("span",{className:"text-base text-gray-600 font-medium",children:["Signed in as ",t.user.email||t.user.name]})]}),(0,a.jsxs)("form",{onSubmit:B,children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-base font-semibold text-gray-700 mb-3",children:"Type *"}
1),(0,a.jsxs)("select",{value:N.type,onChange:e=>w({...N,type:e.target.value}),className:"w-full px-5 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all",required:!0,children:[(0,a.jsx)("option",{value:"Feature Request",children:"\uD83D\uDCA1 Feature Request"}),(0,a.jsx)("option",{value:"Bug Report",children:"\uD83D\uDC1B Bug Report"}),(0,a.jsx)("option",{value:"Improvement",children:"â¡ Improvement"}),(0,a.jsx)("option",{value:"Question",children:"â Question"})]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-base font-semibold text-gray-700 mb-3",children:"Title *"}),(0,a.jsx)("input",{type:"text",value:N.title,onChange:e=>w({...N,title:e.target.value}),placeholder:"Brief summary of your feedback...",maxLength:200,className:"w-full px-5 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all",required:!0}),(0,a.jsxs)("p",{className:"text-sm text-gray-500 mt-2",children:[N.title.length,"/200 characters"]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-base font-semibold text-gray-700 mb-3",children:"Category *"}),(0,a.jsxs)("select",{value:N.category,onChange:e=>w({...N,category:e.target.value}),className:"w-full px-5 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all",required:!0,children:[(0,a.jsx)("option",{value:"",children:"Select a category..."}),S.filter(e=>"All"!==e).map(e=>(0,a.jsx)("option",{value:e,children:e},e))]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-base font-semibold text-gray-700 mb-3",children:"Description *"}),(0,a.jsx)("textarea",{value:N.description,onChange:e=>w({...N,description:e.target.value}),placeholder:"Describe your feedback in detail...",rows:6,maxLength:2e3,className:"w-full px-5 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none transition-all",required:!0}),(0,a.jsxs)("p",{className:"text-sm text-gray-500 mt-2",children:[N.description.length,"/2000 characters"]})]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("button",{type:"submit",disabled:b,className:"px-8 py-3 text-base font-semibold bg-blue-600 text-white rounded-xl hover:bg-blue-700 transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-lg",children:b?"Submitting...":"Submit Feedback"})})]})]}):(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("svg",{className:"w-20 h-20 mx-auto text-gray-400 mb-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),(0,a.jsx)("h3",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Sign in to Submit Feedback"}),(0,a.jsx)("p",{className:"text-lg text-gray-600 mb-6 max-w-md mx-auto",children:"You need to be signed in to submit feedback and participate in the community."}),(0,a.jsx)("button",{onClick:()=>e.push("/signin"),className:"inline-flex items-center px-8 py-3 text-base font-semibold bg-blue-600 text-white rounded-xl hover:bg-blue-700 transition-all shadow-md hover:shadow-lg",children:"Sign In"})]})}),(0,a.jsxs)("div",{className:"bg-white rounded-xl shadow-lg p-6 mb-8 border border-gray-100",children:[(0,a.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-5",children:"Filter & Sort"}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-
15",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-base font-semibold text-gray-700 mb-3",children:"Sort By"}),(0,a.jsx)("select",{value:k.sortBy,onChange:e=>C({...k,sortBy:e.target.value}),className:"w-full px-4 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all",children:[{value:"trending",label:"Trending"},{value:"popular",label:"Most Popular"},{value:"recent",label:"Most Recent"},{value:"comments",label:"Most Commented"}].map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-base font-semibold text-gray-700 mb-3",children:"Category"}),(0,a.jsx)("select",{value:k.category,onChange:e=>C({...k,category:e.target.value}),className:"w-full px-4 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all",children:S.map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-base font-semibold text-gray-700 mb-3",children:"Type"}),(0,a.jsx)("select",{value:k.type,onChange:e=>C({...k,type:e.target.value}),className:"w-full px-4 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all",children:["All","Feature Request","Bug Report","Improvement","Question"].map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-base font-semibold text-gray-700 mb-3",children:"Status"}),(0,a.jsx)("select",{value:k.status,onChange:e=>C({...k,status:e.target.value}),className:"w-full px-4 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all",children:["All","Open","Under Review","Planned","In Progress","Completed","Declined"].map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]})]})]}),(0,a.jsx)("div",{className:"space-y-5",children:0===x.length?(0,a.jsx)("div",{className:"bg-white rounded-xl shadow-lg p-12 text-center border border-gray-100",children:(0,a.jsx)("p",{className:"text-gray-500 text-xl",children:"No feedback found matching your filters."})}):x.map(e=>{var s;return(0,a.jsx)("div",{className:"bg-white rounded-xl shadow-lg p-7 hover:shadow-xl transition-all duration-300 border border-gray-100",children:(0,a.jsxs)("div",{className:"flex items-start gap-5",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>F(e._id),className:"p-3 rounded-xl transition-all ".concat(t&&(null===(s=e.upvotes)||void 0===s?void 0:s.includes(t.user.id))?"bg-blue-600 text-white shadow-md":"bg-gray-100 text-gray-600 hover:bg-gray-200"),title:"Upvote",children:(0,a.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})})}),(0,a.jsx)("span",{className:"text-base font-bold text-gray-700",children:e.upvoteCount})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"flex items-start justify-between mb-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("span",{className:"text-3xl",children:_(e.type)}),(0,a.jsx)("h3",{className:"text-2xl font-bold text-gray-900",children:e.title}),(0,a.jsx)("span",{className:"px-3 py-1.5 rounded-full text-sm font-semibold ".concat(R(e.status)),children:e.status})]})}),(0,a.jsx)("p",{className:"text-base text-gray-600 mb-4 line-clamp-2 leading-relaxed",children:e.description}),(0,a.jsxs)("div",{className:"flex items-center gap-4 text-base text-gray-500 mb-4",children:[(0,a.jsx)("span",{className:"font-semibold text-gray-700",children:e.userName}),(0,a.jsx)("span",{children:"â¢"}),(0,a.jsx)("span",{children:T(e.createdAt)}),(0,a.jsx)("span",{children:"â¢"}),(0,a.jsx)("span",{className:"px-3 py-1.5 bg-gray-100 rounded-lg text-sm font-medium text-gray-700",children:e.category})]}),(0,a.jsxs)("div",{className:"flex items-center gap-6",children:[(0,a.jsxs)("button",{onClick:()=>P(e),className:"flex items-center gap-2 text-base text-gray-600 hover:text-blue-600 transition-colors font-medium",children:[(0,a.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.25
15-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),(0,a.jsxs)("span",{children:[e.commentCount," ",1===e.commentCount?"comment":"comments"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-base text-gray-600 font-medium",children:[(0,a.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})}),(0,a.jsxs)("span",{children:["Engagement: ",e.engagementScore]})]})]})]})]})},e._id)})})]}),g&&(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,a.jsxs)("div",{className:"bg-white rounded-2xl max-w-4xl w-full max-h-[90vh] overflow-hidden flex flex-col shadow-2xl",children:[(0,a.jsx)("div",{className:"p-8 border-b border-gray-200",children:(0,a.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,a.jsx)("span",{className:"text-3xl",children:_(g.type)}),(0,a.jsx)("h2",{className:"text-3xl font-bold text-gray-900",children:g.title})]}),(0,a.jsx)("p",{className:"text-lg text-gray-600 mb-3 leading-relaxed",children:g.description}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-base text-gray-500",children:[(0,a.jsx)("span",{className:"font-semibold text-gray-700",children:g.userName}),(0,a.jsx)("span",{children:"â¢"}),(0,a.jsx)("span",{children:T(g.createdAt)})]})]}),(0,a.jsx)("button",{onClick:()=>{p(null),y([]),v("")},className:"text-gray-400 hover:text-gray-600 transition-colors p-2 hover:bg-gray-100 rounded-lg",children:(0,a.jsx)("svg",{className:"w-7 h-7",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-8",children:0===f.length?(0,a.jsx)("p",{className:"text-gray-500 text-center py-12 text-lg",children:"No comments yet. Be the first to comment!"}):(0,a.jsx)("div",{className:"space-y-5",children:f.map(e=>(0,a.jsxs)("div",{className:"bg-gray-50 rounded-xl p-5 border border-gray-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,a.jsx)("span",{className:"font-bold text-base text-gray-900",children:e.userName}),(0,a.jsx)("span",{className:"text-sm text-gray-500",children:T(e.createdAt)})]}),(0,a.jsx)("p",{className:"text-base text-gray-700 leading-relaxed",children:e.comment})]},e._id))})}),t&&(0,a.jsx)("div",{className:"p-8 border-t border-gray-200 bg-gray-50",children:(0,a.jsxs)("form",{onSubmit:L,children:[(0,a.jsx)("textarea",{value:j,onChange:e=>v(e.target.value),placeholder:"Add your comment...",rows:4,maxLength:1e3,className:"w-full px-5 py-3 text-base border-2 border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none mb-3 transition-all"}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-500",children:[j.length,"/1000 characters"]}),(0,a.jsx)("button",{type:"submit",disabled:!j.trim(),className:"px-6 py-3 text-base font-semibold bg-blue-600 text-white rounded-xl hover:bg-blue-700 transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-lg",children:"Post Comment"})]})]})})]})})]})]})]})}},9008:function(e,t,s){e.exports=s(7828)}},function(e){e.O(0,[4838,4321,6660,4396,509,1664,5675,8005,3542,5069,7517,2888,9774,179],function(){return e(e.s=84695)}),_N_E=e.O()}]);
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.