1import{k as R,c as U,r as l,w as A,_ as $,C as v,D as u,y as s,K as a,N as z,G as d,V as g,W as D,z as n,a3 as G,J as p,Q as F,H as i,L as M,P as B,A as I}from"./vendor-misc-5pJBpqhN.js";import{e as W}from"./vendor-vue-BIDZeepx.js";import{P as J}from"./PageFrame-CmNWALAg.js";import{C as E}from"./ChromeCard-DkvfllPh.js";import{C as K}from"./ChromeButton-DmiFifbd.js";import{A as Q}from"./AsyncState-C1wY1NSf.js";import{S as Y}from"./SectionHeader-60mU8zeF.js";import{E as j}from"./EmptyState-HBFSUaTT.js";import{o as T,k as N,_ as O}from"./index-BNPflmqD.js";import"./creatorFieldHelp-BrZsjpkG.js";import"./vendor-tanstack-B6ELLr_Q.js";import"./vendor-sentry-84cD2ryj.js";import"./vendor-utils-CxkvrZ9U.js";async function X(y){const{data:k}=await T.post("/feedback/submit",y);return k}async function Z(){const{data:y}=await T.get("/feedback/my-feedback");return y}const ee={class:"feedback-tabs",role:"tablist"},te=["aria-selected","onClick"],ae={key:0,class:"badge"},se={key:0},oe={key:1},le={key:2,class:"ok"},re={key:3,class:"err",role:"alert"},ne={class:"history-list"},ie={class:"history-head"},ue={class:"type"},de={class:"status"},pe={key:0,class:"admin-response"},ce="Feedback & support",me=R({__name:"FeedbackPage",setup(y){const k=W(),q=U(()=>k.path.startsWith("/agency")?"Report desk bugs, request talent-manager features, or contact support.":"Report bugs, request features, or share ideas."),H=[{id:"bug",label:"Bug report"},{id:"feature",label:"Feature request"},{id:"improvement",label:"Improvement"},{id:"general",label:"General"},{id:"support",label:"Contact support"},{id:"history",label:"History"}],o=l("bug"),f=l(""),c=l(""),h=l("medium"),_=l(void 0),C=l(!1),w=l(!1),b=l(null),m=l([]),x=l(!1),S=l(null);A(o,r=>{r==="history"&&V()}),$(()=>{o.value==="history"&&V()});async function V(){x.value=!0,S.value=null;try{m.value=await Z()}catch(r){S.value=N(r,"Could not load history")}finally{x.value=!1}}async function L(){C.value=!0,b.value=null,w.value=!1;const r=o.value==="history"||o.value==="support"?"general":o.value,t=o.value==="bug"?`[${h.value}] ${c.value}`:c.value;try{await X({type:r,title:f.value,message:t,rating:o.value==="feature"?_.value:void 0}),w.value=!0,f.value="",c.value=""}catch(e){b.value=N(e,"Could not send feedback")}finally{C.value=!1}}function P(r){try{return new Date(r).toLocaleString()}catch{return r}}return(r,t)=>(s(),v(J,{title:ce,description:q.value},{toolbar:u(()=>[a("div",ee,[(s(),n(M,null,B(H,e=>a("button",{key:e.id,type:"button",role:"tab",class:I(["feedback-tab",{active:o.value===e.id}]),"aria-selected":o.value===e.id,onClick:ve=>o.value=e.id},[d(i(e.label)+" ",1),e.id==="history"&&m.value.length?(s(),n("span",ae,i(m.value.length),1)):p("",!0)],10,te)),64))])]),default:u(()=>[o.value!=="history"?(s(),v(E,{key:0},{default:u(()=>[a("form",{onSubmit:z(L,["prevent"])},[a("label",null,[t[4]||(t[4]=d(" Title ",-1)),g(a("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>f.value=e),type:"text",required:"",minlength:"3",maxlength:"255"},null,512),[[D,f.value]])]),o.value==="bug"?(s(),n("label",se,[t[6]||(t[6]=d(" Severity ",-1)),g(a("select",{"onUpdate:modelValue":t[1]||(t[1]=e=>h.value=e)},[...t[5]||(t[5]=[a("option",{value:"low"},"Low",-1),a("option",{value:"medium"},"Medium",-1),a("option",{value:"high"},"High",-1),a("option",{value:"critical"},"Critical",-1)])],512),[[G,h.value]])])):p("",!0),a("label",null,[t[7]||(t[7]=d(" Details ",-1)),g(a("textarea",{"onUpdate:modelValue":t[2]||(t[2]=e=>c.value=e),rows:"5",required:"",minlength:"10",maxlength:"5000"},null,512),[[D,c.value]])]),o.value==="feature"?(s(),n("label",oe,[t[8]||(t[8]=d(" Rating (optional) ",-1)),g(a("input",{"onUpdate:modelValue":t[3]||(t[3]=e=>_.value=e),type:"number",min:"1",max:"5"},null,512),[[D,_.value,void 0,{number:!0}]])])):p("",!0),F(K,{type:"submit",variant:"primary",loading:C.value},{default:u(()=>[...t[9]||(t[9]=[d("Submit",-1)])]),_:1},8,["loading"]),w.value?(s(),n("p",le,"Thank you â your feedback was recorded.")):p("",!0),b.value?(s(),n("p",re,i(b.value),1)):p("",!0)],32)]),_:1})):(s(),v(Q,{key:1,loading:x.value,error:S.value,onRetry:V},{default:u(()=>[m.value.length?(s(),v(E,{key:0},{default:u(()=>[F(Y,{title:"Your submissions"}),a("ul",ne,[(s(!0),n(M,null,B(m.value,e=>(s(),n("li",{key:e.id,class:"history-item"},[a("div",ie,[a("span",ue,i(e.type),1),a("span",de,i(e.status),1)]),a("strong",null,i(e.title),
11),a("p",null,i(e.message),1),e.admin_response?(s(),n("p",pe,i(e.admin_response),1)):p("",!0),a("time",null,i(P(e.created_at)),1)]))),128))])]),_:1})):(s(),v(j,{key:1,title:"No feedback yet",description:"Submissions you send will appear here with status updates and admin responses."}))]),_:1},8,["loading","error"]))]),_:1},8,["description"]))}}),Fe=O(me,[["__scopeId","data-v-68929524"]]);export{Fe 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.