import{s as a,an as e,L as l,d as s,$ as n,l as o,q as t,o as c,a as d,f as u,u as i,g as r,t as p,j as m,C as _,e as b,aE as h,y as k,ax as v,I as f,ab as g}from"./vendor-edc0678f.js";import{_ as w,e as N,q as V,w as y,ag as B,aE as I,Z as U,aF as x,f as C}from"./index-4c745ab9.js";const P={class:"bind-card"},E={class:"content"},A={class:"form"},j={class:"formInput"},q={class:"label"},R=["placeholder"],T={class:"formInput"},F={key:0,class:"label"},S={key:1,class:"label"},D=["placeholder"],H={class:"formInput"},J={key:0,class:"label"},L={key:1,class:"label"},M=["placeholder"],O={key:0,class:"formInput"},Z={key:0,class:"label"},$={key:1,class:"label"},z=["placeholder"],G={key:1,class:"formInput"},K={class:"label"},Q=w({__name:"edit-bank",setup(w){var Q;const W=a(),X=(a,e=[])=>C(a,e,W),Y=N(),{userInfo:aa}=e(Y),{_toast:ea}=V(),la=l(),sa=s(),na=n(JSON.parse(decodeURI(la.query.data))),oa=o(na.userName||(null==(Q=aa.value.user)?void 0:Q.loginName)),ta={iconRight:[{iconName:"sanchu24x24",clickTo:"del"}]},ca=()=>{h({message:X("Bank_delete")}).then(()=>{I(na.id).then(a=>{"200"==a.code?(ea("Bank_delete_success"),setTimeout(()=>{sa.push("/bind-card")},500)):k(a.msg||"删除失败")})}).catch(()=>{})},da=o([]),ua=o(!1),ia=a=>{na.coin=a.name,ua.value=!1};t(()=>{U("t_bank_coin").then(a=>{"200"==a.code&&a.data.length&&(da.value=a.data.map(a=>({...a,name:a.dictValue.toUpperCase()})))})});const ra=()=>{x(na).then(a=>{"200"==a.code?(ea("Bank_update_success"),setTimeout(()=>{sa.push("/bind-card")},500)):k(msg)})};return(a,e)=>{const l=v,s=f,n=g;return c(),d("div",P,[u(y,{currentName:i(C)("Bank_edit"),cuttentRight:ta,border_bottom:!0,onDel:ca},null,8,["currentName"]),r("div",E,[r("div",A,[r("div",j,[r("p",q,p(i(C)("advanced_name")),1),m(r("input",{placeholder:i(C)("login_please"),"onUpdate:modelValue":e[0]||(e[0]=a=>oa.value=a),class:"form-input"},null,8,R),[[_,oa.value]])]),r("div",T,[["trustwallet","coinmarketcap","kabit","etfinex","ebc"].includes(a._getConfig("_APP_ENV"))?(c(),d("p",F,p(i(C)("bank_account")),1)):(c(),d("p",S,p(i(C)("Bank_card_number")),1)),m(r("input",{placeholder:i(C)("login_please"),"onUpdate:modelValue":e[1]||(e[1]=a=>na.cardNumber=a),class:"form-input"},null,8,D),[[_,na.cardNumber]])]),r("div",H,[["trustwallet","coinmarketcap","kabit","etfinex","ebc"].includes(a._getConfig("_APP_ENV"))?(c(),d("p",J,p(i(C)("bank_name")),1)):(c(),d("p",L,p(i(C)("Bank_own")),1)),m(r("input",{placeholder:i(C)("login_please"),"onUpdate:modelValue":e[2]||(e[2]=a=>na.bankName=a),class:"form-input"},null,8,M),[[_,na.bankName]])]),na.bankBranch?(c(),d("div",O,[["trustwallet","coinmarketcap","kabit","etfinex","ebc"].includes(a._getConfig("_APP_ENV"))?(c(),d("p",Z,p(i(C)("branch_namee")),1)):(c(),d("p",$,p(i(C)("branch_name")),1)),m(r("input",{placeholder:i(C)("login_please"),"onUpdate:modelValue":e[3]||(e[3]=a=>na.bankBranch=a),class:"form-input"},null,8,z),[[_,na.bankBranch]])])):b("",!0),["HFM2","dev"].includes(a._getConfig("_APP_ENV"))?(c(),d("div",G,[r("p",K,p(i(C)("recharge_coin")),1),u(l,{class:"form-input","is-link":"",readonly:"",modelValue:na.coin,"onUpdate:modelValue":e[4]||(e[4]=a=>na.coin=a),placeholder:i(C)("recharge_coin"),onClick:e[5]||(e[5]=a=>ua.value=!0)},null,8,["modelValue","placeholder"]),u(s,{show:ua.value,"onUpdate:show":e[6]||(e[6]=a=>ua.value=a),actions:da.value,onSelect:ia},null,8,["show","actions"])])):b("",!0)]),r("div",{class:"btnBox",onClick:ra},[u(B,{btnValue:i(C)("Bank_save")},null,8,["btnValue"])]),u(n,{show:a.show,"onUpdate:show":e[7]||(e[7]=e=>a.show=e),title:"","show-cancel-button":""},null,8,["show"])])])}}},[["__scopeId","data-v-42171d73"]]);export{Q as default};
