import{I as v}from"./IconProfile-CLsn7h6L.js";import{_ as w}from"./IconCard-jY7IitfY.js";import{u as C}from"./contracts-CILh9uSu.js";import{f as I,D as g,c as B,o as x,a as o,t as s,b as i,e as _,d as k}from"./index-CipWZKo_.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const S={class:"tw-border tw-border-gray-200 tw-rounded tw-p-4"},D={class:"tw-text-2xl"},N={class:"list-item__row tw-mt-4"},$={class:"list-item__balance btn-default"},h={class:"list-item__row"},P={__name:"ServicesContractBalanceBlock",props:{contractId:{type:[String,Number],default:""}},emits:["transfer"],async setup(l,{emit:V}){let n,a;const r=l,c=C(),d=k(),e=I(()=>c?.contractsList?.[r.contractId]);[n,a]=g(()=>c.fetchContracts()),await n,a();function m(){d.push(`/Balance/${r.contractId}`)}return(u,t)=>{const p=w,f=v;return x(),B("div",S,[o("div",D,"# "+s(e.value?.ID)+" / "+s(e.value?.Customer),1),o("div",N,[o("div",$,[i(p),_(" Баланс "+s(e.value?.Balance)+" ₽ ",1)]),o("button",{class:"btn btn-default btn--blue",onClick:t[0]||(t[0]=b=>m())},"Пополнить баланс")]),o("div",h,[o("button",{class:"btn btn-default btn--border",onClick:t[1]||(t[1]=b=>u.$emit("transfer"))},[i(f),t[2]||(t[2]=_(" Передать на другой аккаунт ",-1))])])])}}},j=y(P,[["__scopeId","data-v-416289c7"]]);export{j as _};
