import{ao as I,ap as N}from"./setting.644fa418.js";import U from"./CurrencyRateLogList.a866c7a3.js";import{d as M,b as P,r as f,c as n,e as p,f as x,g as d,h as o,i as l,u,t as E,F as D,j as R,k as V,m as c,A as T,E as Y,y as h,R as j,S as O,_ as $}from"./index.0308b213.js";const q=s=>(j("data-v-b622158c"),s=s(),O(),s),z={class:"setting-form"},G={class:"tn-form-item__tips",style:{color:"red"}},H=c("\u65E5\u5FD7"),J=q(()=>d("div",{class:"tn-form-item__tips",style:{color:"red"}},"\u751F\u4EA7\u73AF\u5883\u624D\u5F00\u542F\uFF0C\u4E0D\u7136\u4F1A\u5F71\u54CD\u7EBF\u4E0A\u514D\u8D39\u6B21\u6570",-1)),K=c("% "),Q={class:"operation-btn"},W=c("\u63D0\u4EA4"),X=M({setup(s){const e=P({myr_to_cny_rate:1,rate_update_time:"",api_update_rate:2,api_allow_error_rate:10,api_list:[]}),w=()=>{I(e).then(()=>{b(),Y.success("\u8D27\u5E01\u914D\u7F6E\u4FDD\u5B58\u6210\u529F")})};let v=f([]);const b=()=>{N().then(_=>{e.myr_to_cny_rate=_.myr_to_cny_rate,e.rate_update_time=_.rate_update_time,e.api_update_rate=_.api_update_rate,e.api_allow_error_rate=_.api_allow_error_rate,e.api_list=_.api_list,v.value=_.support_api_list})};b();const m=f(!1),r=f(!1),C=_=>{m.value=!0,h(()=>{r.value=!0})},A=()=>{m.value=!1,h(()=>{r.value=!1})};return(_,t)=>{const y=n("el-input-number"),g=n("el-button"),i=n("el-form-item"),B=n("el-switch"),k=n("el-checkbox"),L=n("el-checkbox-group"),S=n("el-form");return p(),x(D,null,[d("div",z,[o(S,{model:u(e),"label-width":"80px"},{default:l(()=>[o(i,{label:"\u6C47\u7387\uFF08MYR => CNY\uFF09","label-width":"100px;"},{default:l(()=>[o(y,{modelValue:u(e).myr_to_cny_rate,"onUpdate:modelValue":t[0]||(t[0]=a=>u(e).myr_to_cny_rate=a),precision:"4",min:"0.01",max:"100"},null,8,["modelValue"]),d("div",G,"\u6700\u65B0\u8BBE\u7F6E\u65F6\u95F4\uFF1A"+E(u(e).rate_update_time),1),o(g,{type:"primary",onClick:t[1]||(t[1]=a=>C())},{default:l(()=>[H]),_:1})]),_:1}),o(i,{label:"\u662F\u5426\u5F00\u542FAPI\u63A5\u53E3\u66F4\u65B0","label-width":"100px;"},{default:l(()=>[o(B,{modelValue:u(e).api_update_rate,"onUpdate:modelValue":t[2]||(t[2]=a=>u(e).api_update_rate=a),width:"50px","inline-prompt":"","active-text":"\u5F00\u542F","inactive-text":"\u5173\u95ED","active-value":1,"inactive-value":2},null,8,["modelValue"]),J]),_:1}),o(i,{label:"\u5141\u8BB8\u7684\u6700\u5927\u8BEF\u5DEE\u7387","label-width":"100px;"},{default:l(()=>[o(y,{modelValue:u(e).api_allow_error_rate,"onUpdate:modelValue":t[3]||(t[3]=a=>u(e).api_allow_error_rate=a),precision:"2",min:"1",max:"100"},null,8,["modelValue"]),K]),_:1}),o(i,{label:"\u652F\u6301\u7684API\u6E20\u9053\u5546\u5217\u8868\uFF1A","label-width":"100px;"},{default:l(()=>[o(L,{modelValue:u(e).api_list,"onUpdate:modelValue":t[4]||(t[4]=a=>u(e).api_list=a)},{default:l(()=>[(p(!0),x(D,null,R(u(v),(a,F)=>(p(),V(k,{key:F,label:F,value:F},{default:l(()=>[c(E(a),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"]),d("div",Q,[o(g,{type:"primary",onClick:w},{default:l(()=>[W]),_:1})])]),m.value?(p(),V(U,{key:0,modelValue:r.value,"onUpdate:modelValue":t[5]||(t[5]=a=>r.value=a),onOnClose:A},null,8,["modelValue"])):T("",!0)],64)}}});const ae=$(X,[["__scopeId","data-v-b622158c"]]);export{ae as default};
