2026-03-03 20:40:54 +03:30
|
|
|
import{B as M}from"./DJir2CeY.js";import{_ as V}from"./DvWNwIUf.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,dI as T,F as B,ee as Z,T as f,Q as G,J as X,a3 as U,a8 as D,u as ee,A,a9 as $}from"./CE4SaZgW.js";import{B as O}from"./5PiJbsaQ.js";import{B as H}from"./g9otGdDE.js";import{S as W}from"./ssSX8W6r.js";import{F as J}from"./C6Lfa4XD.js";import{_ as K}from"./DSWAPs-i.js";import{_ as Q}from"./CWhMemCQ.js";import{_ as q}from"./DlAUqK2U.js";import{B as te}from"./DAaUah2x.js";import{M as h}from"./DR5vmjv0.js";import{C as se}from"./CCiNyU7o.js";import"./C3szrT99.js";import{_ as ae,R as le}from"./BTQNEIGx.js";/* empty css */import"./CscEAC8U.js";import"./GIvwLoBE.js";import"./C9-mKqzf.js";import"./CjPHwh7J.js";import"./cA5fh2lg.js";import"./BD2G5fvF.js";import"./B2MUeQ_z.js";import"./BQKhYWGC.js";import"./ogsyABxJ.js";import"./PGC92_Sj.js";import"./DFL6LqjW.js";import"./0N7JoioX.js";import"./CDDBg3Y_.js";import"./Dmy9LQHx.js";import"./BK6U06JP.js";import"./B5RoG9wW.js";import"./Cj99RmFE.js";import"./B0tUBnBT.js";import"./DZnIL_2I.js";import"./CxVR7ht-.js";import"./CCrciQyb.js";import"./DdTQqoBP.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=K,R=J,I=W;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
|