1import{f as w,l as M,r as l,t as C,j as t,A as S,h as L,C as o,e as d,B as j,c as f,d as N,ae as A,af as B,w as z,m as H,b as i}from"./index-bM8UT4Os.js";import{L as x}from"./label-2Seh_wFH.js";import{I as T}from"./input-BwpLlRYf.js";import{T as E}from"./textarea-DArC7VX4.js";import{M as I,S as v,R}from"./send-B5ZhDdrU.js";import{C as q}from"./circle-check-BF-IFrtm.js";import{C as F}from"./circle-help-d9Ix-JKs.js";import{L as D}from"./lightbulb-Pi6aQ1eP.js";import"./dialog-CxcTDVnZ.js";import"./useComposition-DO5dIJEj.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const K=w("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),P=[{value:"question",label:"â æ¥è©¢",icon:F,desc:"æå¢æ³å"},{value:"suggestion",label:"ð¡ 建è°",icon:D,desc:"æå¥½æè°"},{value:"bug",label:"ð Bug åå ±",icon:K,desc:"ç¼ç¾åé¡"},{value:"other",label:"ð å ¶ä»",icon:A,desc:"å ¶ä»äºé "}];function Z(){const[,y]=M(),[s,m]=l.useState(""),[a,p]=l.useState(""),[c,g]=l.useState(""),[u,h]=l.useState(!1),r=C.contact.submit.useMutation(),{data:n}=C.contact.getMyMessages.useQuery(),k=async()=>{if(!s.trim()||!a.trim()||!c){i.error("å¡«ææææ¬ä½å ");return}try{await r.mutateAsync({subject:s.trim(),message:a.trim(),category:c}),h(!0),i.success("è¨æ¯å·²éåºï¼æåæç¡å¿«åè¦ä½ ð¬"),m(""),p(""),g("")}catch(e){i.error("éåå°ï¼"+(e.message||"è©¦å¤æ¬¡"))}},b={pending:{label:"çå¾ ä¸",color:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400"},read:{label:"å·²é±è®",color:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"},replied:{label:"å·²åè¦",color:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400"}};return t.jsx(S,{"data-loc":"client/src/pages/Contact.tsx:72",title:"è¯çµ¡æå",showBack:!0,children:t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:73",className:"max-w-2xl mx-auto px-4 py-6 pb-24",children:[t.jsxs("button",{"data-loc":"client/src/pages/Contact.tsx:75",onClick:()=>y("/"),className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-4 transition-colors",children:[t.jsx(L,{"data-loc":"client/src/pages/Contact.tsx:79",className:"w-4 h-4"}),"è¿å»ä¸»é "]}),t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:83",className:"text-center mb-6",children:[t.jsxs("h1",{"data-loc":"client/src/pages/Contact.tsx:84",className:"text-2xl font-bold bg-gradient-to-r from-blue-500 to-purple-500 bg-clip-text text-transparent flex items-center justify-center gap-2",children:[t.jsx(I,{"data-loc":"client/src/pages/Contact.tsx:85",className:"w-7 h-7 text-blue-500"}),"è¯çµ¡æå"]}),t.jsx("p",{"data-loc":"client/src/pages/Contact.tsx:88",className:"text-sm text-muted-foreground mt-1",children:"æåé¡æå»ºè°ï¼é¨ææµæåå¾ ð¬"})]}),u&&t.jsx(o,{"data-loc":"client/src/pages/Contact.tsx:95",className:"mb-6 card-premium",children:t.jsxs(d,{"data-loc":"client/src/pages/Contact.tsx:96",className:"p-6 text-center",children:[t.jsx("div",{"data-loc":"client/src/pages/Contact.tsx:97",className:"w-16 h-16 mx-auto mb-3 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:t.jsx(q,{"data-loc":"client/src/pages/Contact.tsx:98",className:"w-8 h-8 text-green-500"})}),t.jsx("h3",{"data-loc":"client/src/pages/Contact.tsx:100",className:"font-bold text-lg",children:"è¨æ¯å·²éåºï¼"}),t.jsx("p",{"data-loc":"client/src/pages/Contact.tsx:101",className:"text-sm text-muted-foreground mt-1",children:"æåæ¶å°ä½ å è¨æ¯åï¼æç¡å¿«åè¦ä½ ð"}),t.jsx(j,{"data-loc":"client/src/pages/Contact.tsx:104",variant:"outline",className:"mt-4",onClick:()=>h(!1),children:"åç¼ä¸æ¢è¨æ¯"})]})}),!u&&t.jsxs(o,{"data-loc":"client/src/pages/Contact.tsx:117",className:"mb-6 card-premium",children:[t.jsx(f,{"data-loc":"client/src/pages/Contact.tsx:118",className:"pb-3",children:t.jsxs(N,{"data-loc":"client/src/pages/Contact.tsx:119",className:"text-lg flex items-center gap-2",children:[t.jsx(v,{"data-loc":"client/src/pages/Contact.tsx:120",className:"w-5 h-5 text-blue-500"}),"ç¼éè¨æ¯"]})}),t.jsxs(d,{"data-loc":"client/src/pages/Contact.tsx:124",className:"space-y-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:126",children:[t.jsx(x,{"data-loc":"client/src/pages/Contact.tsx:127",className:"text-sm font-medium",children:"è¨æ¯é¡å"}),t.jsx("div",{"data-loc":"client/src/pages/Contact.tsx:128",className:"grid grid-cols-2 gap-2 mt-2",children:P.map(e=>t.jsxs("button",{"data-loc":"client/src/pages/Contact.tsx:130",onClick:()=>g(e.value),className:`p-3 rounded-xl border-2 text-left transition-all duration-200 hover:scale-[1.01] active:scale-95 ${c===e.value?"border-blue-400 bg-blue-50 dark:bg-blue-950/30 shadow-md":"border-border hover:border-blue-200 dark:hover:border-blue-800"}`,children:[t.jsx("p",{"data-loc":"client/src/pages/Contact.tsx:139",className:"text-sm font-medium",children:e.label}),t.jsx("p",{"data-loc":"client/src/pages/Contact.tsx:140",className:"text-xs text-muted-foreground",children:e.desc})]},e.value))})]}),t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:147",children:[t.jsx(x,{"data-loc":"client/src/pages/Contact.tsx:148",className:"text-sm font-medium",children:"主é¡"}),t.jsx(T,{"data-loc":"client/src/pages/Contact.tsx:149",placeholder:"ç°¡å®æè¿°ä½ å åé¡æå»ºè°...",value:s,onChange:e=>m(e.target.value),className:"mt-1",maxLength:255})]}),t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:159",children:[t.jsx(x,{"data-loc":"client/src/pages/Contact.tsx:160",className:"text-sm font-medium",children:"è©³ç´°å §å®¹"}),t.jsx(E,{"data-loc":"client/src/pages/Contact.tsx:161",placeholder:"詳細è¬ä¸ä½ æ³æ¥è©¢å å¢ï¼æåæèªççæ¯ä¸æ¢è¨æ¯ â¨",value:a,onChange:e=>p(e.target.value),className:"mt-1 min-h-[120px] resize-none",maxLength:2e3}),t.jsxs("p",{"data-loc":"client/src/pages/Contact.tsx:168",className:"text-xs text-muted-foreground mt-1 text-right",children:[a.length,"/2000"]})]}),t.jsx(j,{"data-loc":"client/src/pages/Contact.tsx:174",onClick:k,disabled:r.isPending||!s.trim()||!a.trim()||!c,className:"w-full bg-gradient-to-r from-blue-500 to-purple-500 hover:from-blue-600 hover:to-purple-600 text-white py-5 text-base font-medium",children:r.isPending?t.jsxs(t.Fragment,{children:[t.jsx(B,{"data-loc":"client/src/pages/Contact.tsx:181",className:"w-4 h-4 mr-2"}),"éåºä¸..."]}):t.jsxs(t.Fragment,{children:[t.jsx(v,{"data-loc":"client/src/pages/Contact.tsx:186",className:"w-4 h-4 mr-2"}),"éåºè¨æ¯"]})})]})]}),n&&n.length>0&&t.jsxs(o,{"data-loc":"client/src/pages/Contact.tsx:197",className:"card-premium",children:[t.jsx(f,{"data-loc":"client/src/pages/Contact.tsx:198",className:"pb-3",children:t.jsxs(N,{"data-loc":"client/src/pages/Contact.tsx:199",className:"text-base flex items-center gap-2",children:[t.jsx(z,{"data-loc":"client/src/pages/Contact.tsx:200",className:"w-4 h-4 text-muted-foreground"}),"æå æ¥è©¢è¨é"]})}),t.jsx(d,{"data-loc":"client/src/pages/Contact.tsx:204",children:t.jsx("div",{"data-loc":"client/src/pages/Contact.tsx:205",className:"space-y-3",children:n.map(e=>t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:207",className:"p-3 rounded-lg bg-muted/50 border border-border",children:[t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:211",className:"flex items-center justify-between mb-1",children:[t.jsx("h4",{"data-loc":"client/src/pages/Contact.tsx:212",className:"font-medium text-sm truncate flex-1",children:e.subject}),t.jsx(H,{"data-loc":"client/src/pages/Contact.tsx:213",className:`text-[10px] ml-2 ${b[e.status||"pending"]?.color||""}`,children:b[e.status||"pending"]?.label||e.status})]}),t.jsx("p",{"data-loc":"client/src/pages/Contact.tsx:217",className:"text-xs text-muted-foreground line-clamp-2",children:e.message}),t.jsx("p",{"data-loc":"client/src/pages/Contact.tsx:218",className:"text-[10px] text-muted-foreground mt-1.5",children:new Date(e.createdAt).toLocaleStr
6ing("zh-HK")}),e.reply&&t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:224",className:"mt-3 p-3 rounded-lg bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-950/30 dark:to-purple-950/30 border border-blue-200/50 dark:border-blue-800/50",children:[t.jsxs("div",{"data-loc":"client/src/pages/Contact.tsx:225",className:"flex items-center gap-1.5 mb-1.5",children:[t.jsx(R,{"data-loc":"client/src/pages/Contact.tsx:226",className:"w-3.5 h-3.5 text-blue-500"}),t.jsx("span",{"data-loc":"client/src/pages/Contact.tsx:227",className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:"管çå¡åè¦"})]}),t.jsx("p",{"data-loc":"client/src/pages/Contact.tsx:229",className:"text-sm text-foreground whitespace-pre-wrap",children:e.reply}),e.repliedAt&&t.jsx("p",{"data-loc":"client/src/pages/Contact.tsx:231",className:"text-[10px] text-muted-foreground mt-1.5",children:new Date(e.repliedAt).toLocaleString("zh-HK")})]})]},e.id))})})]})]})})}export{Z 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.