2026-03-08 18:08:09 +03:30
|
|
|
import{B as M}from"./BF8iYLk3.js";import{_ as V}from"./D2SNX0L7.js";import{d as N,H as E,r as y,I as Y,a0 as F,af as j,o as L,z as _,G as m,E as r,B as i,C as p,K as e,D as a,S as z,dK as T,F as B,eg as Z,T as f,Q as G,J as X,a3 as U,a8 as D,u as ee,A,a9 as $}from"./2b2DIrDg.js";import{B as O}from"./Y5jUpBaB.js";import{B as H}from"./C5DsgS3M.js";import{S as K}from"./DYJI7GtV.js";import{F as W}from"./CqpOv0Yb.js";import{_ as J}from"./D6dAkk30.js";import{_ as Q}from"./DrwOb2jt.js";import{_ as q}from"./DlAUqK2U.js";import{B as te}from"./BP5tRGVA.js";import{M as h}from"./BsTRgetf.js";import{C as se}from"./5z_X-qsU.js";import"./ppPor33q.js";import{_ as ae,R as le}from"./BBasdelY.js";/* empty css */import"./CscEAC8U.js";import"./DcbWJrYV.js";import"./B7O0nS_U.js";import"./CcluhcvW.js";import"./CRJR78zL.js";import"./C1lEr5hB.js";import"./B2ixEu9U.js";import"./C9Z4p-5_.js";import"./BivmLwTy.js";import"./D0ip_SvR.js";import"./BvchIXMW.js";import"./C8nXmjGF.js";import"./bF5Sukkh.js";import"./BoWGGOWZ.js";import"./BgKPA21b.js";import"./BuBKZQR8.js";import"./Cj99RmFE.js";import"./CsadUkkm.js";import"./DgllgtJX.js";import"./t58q1HHt.js";import"./Dqxij0wl.js";import"./C8DVFjqp.js";const ie={class:"h-30vh px-5 mt3"},ne={class:"font-semibold text-xl"},oe={class:"mt5 rounded-xl border-gray-200 border-1px py-2"},re={class:"flex justify-between"},ue=N({__name:"TaxAndSilverProfit",props:{open:{type:Boolean}},emits:["update:open"],setup(P,{emit:o}){const n=E(),d=y(null);y("default");const c=Y(),C=P,x=o,t=y({has_silver_tax:!1,tax_silver_profit:0});F(C,v=>{v.open?b():k()});async function b(){await j(),await d.value?.setOpen()}async function k(){await j(),await d.value?.setClose(),x("update:open",!1)}function l(){console.log(c.user),t.value.has_silver_tax=!!c.user?.has_silver_tax,t.value.tax_silver_profit=c.user?.tax_silver_profit??0}async function w(){try{t.value.tax_silver_profit&&parseInt(t.value.tax_silver_profit),z.value=!0,await Z({id:c.user.id,...t.value}),await k()}catch(v){console.log(v)}finally{z.value=!1}}return L(()=>{l()}),(v,s)=>{const S=Q,g=J,R=W,I=K;return _(),m(M,{title:"",ref_key:"sheetRef",ref:d,headerCls:"",closeOnClickOutside:"",onOnClickOutside:s[2]||(s[2]=u=>x("update:open",!1))},{header:r(()=>[s[3]||(s[3]=i("div",{flex:"","justify-center":"","items-center":"","flex-col":"","p-2":""},[i("div",{"bg-gray-500":"","h-2px":"","w-2.5rem":""})],-1)),i("div",null,[a(V,{class:"w-1rem mt-5 ms-5",onClick:k})])]),default:r(()=>[i("div",ie,[i("div",ne,p(e(n).useString("specifySilverTaxAndProfit")),1),i("div",oe,[a(I,{spinning:e(z)},{default:r(()=>[a(R,{ref:"formRef",model:t.value,autocomplete:"off",layout:"vertical"},{default:r(()=>[a(g,{name:"has_silver_tax"},{default:r(()=>[i("div",re,[i("span",null,p(e(n).useString("hasTax")),1),a(S,{class:"h-6",checked:t.value.has_silver_tax,"onUpdate:checked":s[0]||(s[0]=u=>t.value.has_silver_tax=u),"checked-children":e(n).useString("enable"),"un-checked-children":e(n).useString("disable")},null,8,["checked","checked-children","un-checked-children"])])]),_:1}),a(g,{label:e(n).useString("profit"),name:"profit"},{default:r(()=>[a(O,{value:t.value.tax_silver_profit,"onUpdate:value":s[1]||(s[1]=u=>t.value.tax_silver_profit=u),type:"number","addon-before":"%",onClick:e(T)},null,8,["value","onClick"])]),_:1},8,["label"]),a(H,{size:"50px",block:"",type:"primary",onClick:w},{default:r(()=>[B(p(e(n).useString("submit")),1)]),_:1})]),_:1},8,["model"])]),_:1},8,["spinning"])])])]),_:1},512)}}}),de=Object.assign(q(ue,[["__scopeId","data-v-c071ba2a"]]),{__name:"TaxAndSilverProfit"}),ce={class:"flex items-center pb-2 relative"},pe={class:"font-semibold text-xl absolute w-full text-center"},_e={class:"h-40vh px-5 mt3 overflow-y-auto pb-20"},ve={class:"mt5 rounded-xl border-gray-200 border-1px py-2"},ge={class:"flex justify-between"},he={class:"flex justify-between"},fe={class:"flex justify-between"},me={class:"flex justify-between"},ye={class:"flex justify-between"},xe={class:"flex justify-between"},ke={class:"flex justify-between"},be={class:"fixed bottom-0 right-0 left-0 p-2"},Se=N({__name:"GatewaysMo
|