1import{t as i,b as c,r as o,j as e}from"./index-C3Qps0S4.js";import{T as p}from"./trophy-C56YBVkm.js";import{S as m}from"./save-DgLGcrQc.js";import{S as u}from"./settings-Cj6VgvAK.js";const h={enabled:{label:"à¹à¸à¸´à¸à¹à¸à¹à¸£à¸°à¸à¸ Leaderboard",desc:"à¹à¸à¸´à¸/à¸à¸´à¸à¸£à¸°à¸à¸à¸à¸£à¸°à¸à¸²à¸à¸à¸¹à¹à¸à¸³à¸à¸±à¹à¸à¸«à¸¡à¸",type:"boolean"},live_feed_enabled:{label:"à¹à¸à¸´à¸ Live Feed",desc:"à¹à¸ªà¸à¸à¸ªà¸à¸´à¸à¸´à¸ªà¸³à¹à¸£à¹à¸à¸¥à¹à¸²à¸ªà¸¸à¸à¹à¸à¸ real-time",type:"boolean"},min_usage_count:{label:"à¸à¸³à¸à¸§à¸à¹à¸à¹à¸à¸±à¹à¸à¸à¹à¸³",desc:"à¸à¹à¸à¸à¹à¸à¹à¸ªà¸¹à¸à¸£à¸à¸µà¹à¸à¸£à¸±à¹à¸à¸à¸¶à¸à¸à¸°à¹à¸ªà¸à¸à¸à¸ Leaderboard",type:"number"},min_win_rate:{label:"Win Rate à¸à¸±à¹à¸à¸à¹à¸³ (%)",desc:"Win Rate à¸à¸±à¹à¸à¸à¹à¸³à¸à¸µà¹à¸à¹à¸à¸à¸¡à¸µà¸à¸¶à¸à¸à¸°à¹à¸ªà¸à¸",type:"number"},update_interval:{label:"à¸à¹à¸§à¸à¸à¸±à¸à¹à¸à¸ (วิà¸à¸²à¸à¸µ)",desc:"à¸à¸§à¸²à¸¡à¸à¸µà¹à¹à¸à¸à¸²à¸£à¸£à¸µà¹à¸à¸£à¸à¸à¹à¸à¸¡à¸¹à¸¥",type:"number"},show_top_users:{label:"à¸à¸³à¸à¸§à¸à¸à¸¹à¹à¹à¸à¹ Top",desc:"à¸à¸³à¸à¸§à¸à¸à¸¹à¹à¹à¸à¹à¸à¸µà¹à¹à¸ªà¸à¸à¸à¸à¸à¸£à¸°à¸à¸²à¸à¸à¸¹à¹à¸à¸³",type:"number"},show_live_feed_count:{label:"à¸à¸³à¸à¸§à¸ Live Feed",desc:"à¸à¸³à¸à¸§à¸à¸£à¸²à¸¢à¸à¸²à¸£ Live Feed à¸à¸µà¹à¹à¸ªà¸à¸",type:"number"}};function f(){const{data:t,refetch:g}=i.leaderboard.settings.useQuery(),r=i.leaderboard.adminUpdateSettings.useMutation({onSuccess:()=>{c.success("à¸à¸±à¸à¸à¸¶à¸à¸ªà¸³à¹à¸£à¹à¸"),g()},onError:()=>c.error("à¹à¸à¸´à¸à¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸")}),[s,n]=o.useState({});o.useEffect(()=>{t&&n(t)},[t]);const x=a=>{r.mutate({key:a,value:s[a]||""})},b=()=>{Object.keys(s).forEach(a=>{s[a]!==t?.[a]&&r.mutate({key:a,value:s[a]})})};return e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:45",className:"space-y-4 pb-4",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:47",className:"glass-card-orange rounded-2xl p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:48",className:"flex items-center gap-3",children:[e.jsx(p,{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:49",className:"w-7 h-7 text-yellow-400"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:50",children:[e.jsx("h1",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:51",className:"text-lg font-bold text-white",children:"à¸à¸±à¹à¸à¸à¹à¸² Leaderboard"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:52",className:"text-xs text-gray-400",children:"à¸à¸±à¸à¸à¸²à¸£à¸£à¸°à¸à¸à¸à¸£à¸°à¸à¸²à¸à¸à¸¹à¹à¸à¸³"})]})]})}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:58",className:"space-y-3",children:Object.entries(h).map(([a,l])=>e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:60",className:"glass-card rounded-xl p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:61",className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:62",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:63",className:"text-sm font-medium text-white",children:l.label}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:64",className:"text-[10px] text-gray-500",children:l.desc})]}),l.type==="boolean"?e.jsx("button",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:67",onClick:()=>{const d=s[a]==="true"?"false":"true";n({...s,[a]:d}),r.mutate({key:a,value:d})},className:`w-12 h-6 rounded-full transition-all relative ${s[a]==="true"?"bg-green-500":"bg-gray-700"}`,children:e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:77",className:`w-5 h-5 rounded-full bg-white absolute top-0.5 transition-all ${s[a]==="true"?"left-6":"left-0.5"}`})}):e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:84",className:"flex items-center gap-2",children:[e.jsx("input",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:85",type:"number",value:s[a]||"",onChange:d=>n({...s,[a]:d.target.value}),className:"w-20 bg-gray-800 border border-gray-700 rounded-lg px-2 py-1 text-sm text-white text-center"}),e.jsx("button",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:91",onClick:()=>x(a),className:"p-1.5 rounded-lg bg-orange-500/20 text-orange-400 hover:bg-orange-500/30 transition-colors",children:e.jsx(m,{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:95",className:"w-3.5 h-3.5"})})]})]})},a))}),e.jsxs("button",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:105",onClick:b,className:"w-full py-3 rounded-xl bg-gradient-to-r from-orange-500 to-amber-500 text-white font-medium text-sm flex items-center justify-center gap-2 hover:shadow-[0_0_15px_rgba(245,158,11,0.3)] transition-all active:scale-[0.97]",children:[e.jsx(m,{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:109",className:"w-4 h-4"}),"à¸à¸±à¸à¸à¸¶à¸à¸à¸±à¹à¸à¸«à¸¡à¸"]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:114",className:"glass-card rounded-xl p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:115",className:"flex items-center gap-2 mb-2",children:[e.jsx(u,{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:116",className:"w-4 h-4 text-gray-400"}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:117",className:"text-xs font-medium text-gray-300",children:"หมายà¹à¸«à¸à¸¸"})]}),e.jsxs("ul",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:119",className:"space-y-1 text-[10px] text-gray-500",children:[e.jsx("li",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:120",children:"⢠à¸à¸´à¸à¸£à¸°à¸à¸ Leaderboard à¸à¸°à¸à¹à¸à¸à¸à¸à¸£à¹à¸à¸à¸±à¹à¸à¸«à¸à¹à¸²à¸«à¸¥à¸±à¸à¹à¸¥à¸°à¸«à¸à¹à¸² Leaderboard"}),e.jsx("li",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:121",children:"⢠à¸à¸¹à¹à¹à¸à¹à¸à¸µà¹à¸¡à¸µà¸à¸³à¸à¸§à¸à¹à¸à¹à¸à¹à¸à¸¢à¸à¸§à¹à¸²à¸à¸±à¹à¸à¸à¹à¸³à¸à¸°à¹à¸¡à¹à¹à¸ªà¸à¸à¸à¸à¸à¸à¸£à¹à¸"}),e.jsx("li",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:122",children:"⢠à¸à¸¹à¹à¹à¸à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¹à¸à¸à¸à¸±à¸§à¹à¸à¸à¸à¸²à¸à¸à¸à¸£à¹à¸à¹à¸à¹à¹à¸à¸«à¸à¹à¸²à¹
1à¸à¸£à¹à¸à¸¥à¹"}),e.jsx("li",{"data-loc":"client/src/pages/admin/AdminLeaderboardPage.tsx:123",children:"⢠à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸°à¸à¸±à¸à¹à¸à¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´à¸à¸²à¸¡à¸à¹à¸§à¸à¹à¸§à¸¥à¸²à¸à¸µà¹à¸à¸±à¹à¸à¹à¸§à¹"})]})]})]})}export{f 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.