1import{t as r,b as u,r as o,j as e}from"./index-C3Qps0S4.js";import{C as S,a as f}from"./card-DtXeaqs_.js";import{B as b}from"./button-xdpkFraK.js";import{I as P}from"./input-Dj8udylZ.js";import{S as h}from"./settings-Cj6VgvAK.js";import{S as j}from"./save-DgLGcrQc.js";import"./index-Jol-UBUv.js";import"./dialog-BY1FISUw.js";import"./index-BKUanX19.js";import"./index-Dr02_Kwf.js";function I(){const{data:s,isLoading:d,refetch:m}=r.admin.formulaSettings.useQuery(),n=r.admin.updateFormulaSetting.useMutation({onSuccess:()=>{m(),u.success("à¸à¸±à¸à¸à¸¶à¸à¸ªà¸³à¹à¸£à¹à¸")}}),[i,c]=o.useState({});o.useEffect(()=>{if(s){const t={};s.forEach(a=>{t[a.settingKey]=a.settingValue}),c(t)}},[s]);const g=t=>{n.mutate({key:t,value:i[t]??""})},p={max_free_formulas:{label:"à¸à¸³à¸à¸§à¸à¸ªà¸¹à¸à¸£à¸à¸£à¸µà¸ªà¸¹à¸à¸ªà¸¸à¸",description:"à¸à¸³à¸à¸§à¸à¸ªà¸¹à¸à¸£à¸à¸£à¸µà¸à¸µà¹à¸à¸¹à¹à¹à¸à¹à¹à¸à¹à¹à¸à¹à¸à¹à¸à¸§à¸±à¸"},formula_cooldown_minutes:{label:"Cooldown สูà¸à¸£ (à¸à¸²à¸à¸µ)",description:"ระยะà¹à¸§à¸¥à¸²à¸à¸±à¸à¸£à¸°à¸«à¸§à¹à¸²à¸à¸à¸²à¸£à¹à¸à¹à¸ªà¸¹à¸à¸£"},min_rounds_for_prediction:{label:"à¸à¸³à¸à¸§à¸à¸à¸²à¸à¸±à¹à¸à¸à¹à¸³à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸³à¸à¸²à¸¢",description:"à¸à¹à¸à¸à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥à¸à¸µà¹à¸à¸²à¸à¹à¸à¸à¹à¸£à¸´à¹à¸¡à¸à¸³à¸à¸²à¸¢"},default_win_rate_display:{label:"Win Rate à¹à¸£à¸´à¹à¸¡à¸à¹à¸ (%)",description:"Win Rate à¸à¸µà¹à¹à¸ªà¸à¸à¹à¸¡à¸·à¹à¸à¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥à¹à¸à¸µà¸¢à¸à¸à¸"},enable_ai_prediction:{label:"à¹à¸à¸´à¸ AI Prediction",description:"1 = à¹à¸à¸´à¸, 0 = à¸à¸´à¸"},max_bet_steps:{label:"à¸à¸³à¸à¸§à¸ Step สูà¸à¸ªà¸¸à¸",description:"à¸à¸³à¸à¸§à¸ Step à¹à¸à¸ªà¸¹à¸à¸£ Bankroll (à¸à¹à¸²à¹à¸£à¸´à¹à¸¡à¸à¹à¸ 4)"},cost_per_correct_prediction:{label:"Point à¸à¸µà¹à¸«à¸±à¸à¹à¸¡à¸·à¹à¸à¸ªà¸¹à¸à¸£à¸à¸¹à¸",description:"à¸à¸³à¸à¸§à¸ Point à¸à¸µà¹à¸«à¸±à¸à¸à¹à¸à¸à¸£à¸±à¹à¸à¸à¸µà¹à¸à¸³à¸à¸²à¸¢à¸à¸¹à¸"},enable_correct_prediction_deduction:{label:"à¹à¸à¸´à¸à¸£à¸°à¸à¸à¸«à¸±à¸ Point à¹à¸¡à¸·à¹à¸à¸ªà¸¹à¸à¸£à¸à¸¹à¸",description:"1 = à¹à¸à¸´à¸ (หัภPoint à¹à¸à¸à¸²à¸°à¹à¸¡à¸·à¹à¸à¸à¸³à¸à¸²à¸¢à¸à¸¹à¸), 0 = à¸à¸´à¸ (à¹à¸¡à¹à¸«à¸±à¸)"}};return e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:39",className:"space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:40",className:"flex items-center gap-3",children:[e.jsx(h,{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:41",className:"w-6 h-6 text-orange-400"}),e.jsx("h1",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:42",className:"text-2xl font-bold text-orange-400",children:"à¸à¸±à¹à¸à¸à¹à¸²à¸ªà¸¹à¸à¸£"})]}),d?e.jsx("div",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:46",className:"text-zinc-400",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸..."}):e.jsx("div",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:48",className:"grid gap-4",children:Object.entries(i).map(([t,a])=>{const l=p[t]||{label:t,description:""};return e.jsx(S,{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:52",className:"bg-zinc-900/50 border-zinc-800",children:e.jsx(f,{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:53",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:54",className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:55",className:"flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:56",className:"text-sm font-medium text-zinc-200",children:l.label}),e.jsx("p",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:57",className:"text-xs text-zinc-500",children:l.description})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:59",className:"flex items-center gap-2",children:[e.jsx(P,{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:60",value:a,onChange:x=>c({...i,[t]:x.target.value}),className:"w-24 bg-zinc-800 border-zinc-700 text-center"}),e.jsx(b,{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:65",size:"sm",onClick:()=>g(t),disabled:n.isPending,className:"bg-orange-600 hover:bg-orange-700",children:e.jsx(j,{"data-loc":"client/src/pages/admin/AdminFormulaSettingsPage.tsx:66",className:"w-3 h-3"})})]})]})})},t)})})]})}export{I 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.