import{p as f,J as _,c as m,a as h,g as d,e as g,w as y,b as s,d as v,t,O as w,j as l,s as x,o as i}from"./app-CYVHboi-.js";import{_ as b}from"./Loading-C17YK6G3.js";import{_ as k,a as $,b as B}from"./TemplateTwo-D1yIj8Ou.js";import{_ as j}from"./TemplateOne-CqNNof5p.js";import"./browser-BwNzv7vE.js";import"./Modal-oUJ1UwGv.js";import"./Attachments-CeMFdFu2.js";import"./DialogModal-BGpz32gV.js";import"./SecondaryButton-CHQvCfls.js";import"./DangerButton-dMO1Xwz1.js";import"./ViewCustomFields-CiekLLjv.js";const N={key:0,class:"relative h-64"},R={class:"mx-4 mt-4 rounded-md border border-gray-200 bg-gray-50 px-5 py-4 dark:border-gray-700 dark:bg-gray-950"},V={class:"flex items-center justify-between text-lg font-bold"},C={class:"mt-2"},O={key:2,class:"flex min-h-64 items-center justify-center p-6 text-lg font-thin"},G={__name:"QuickView",props:["current","custom_fields","editRow","force"],setup(o){const u=x(),a=o,r=l(!0),n=l(null),p={One:j,Two:B,Three:$,Minimal:k};return f(async()=>{await _.get(a.force?route("expenses.report.show",{id:a.current.id}):route("expenses.show",{expense:a.current.id,json:!0})).then(e=>{n.value=e.data,r.value=!1}).catch(()=>r.value=!1)}),(e,T)=>r.value?(i(),m("div",N,[h(d(b))])):n.value?(i(),g(w(p[d(u).props.settings?.sale_template||"One"]),{key:1,type:"expense",record:n.value,editRow:o.editRow,custom_fields:o.custom_fields},{amount:y(({record:c})=>[s("div",R,[s("div",V,[v(t(e.$t("Amount"))+": ",1),s("span",null,t(e.$currency(c.amount)),1)]),s("div",C,t(e.$t("By"))+": "+t(c.user?.name),1)])]),_:1},8,["record","editRow","custom_fields"])):(i(),m("div",O,t(e.$t("No data found, the record might not belong to the selected store.")),1))}};export{G as default};
