import{p as u,J as f,c,a as d,g as i,e as p,O as _,t as h,j as r,s as v,o as n}from"./app-CYVHboi-.js";import{_ as g}from"./Loading-C17YK6G3.js";import{_ as x,a as w,b as y}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 k={key:0,class:"relative h-64"},$={key:2,class:"flex min-h-64 items-center justify-center p-6 text-lg font-thin"},P={__name:"QuickView",props:["current","custom_fields","editRow","xfetch"],setup(e){const m=v(),a=e,t=r(!0),s=r(null),l={One:j,Two:y,Three:w,Minimal:x};return u(async()=>{a.xfetch?(s.value=a.current,t.value=!1):await f.get(route("adjustments.show",{adjustment:a.current.id,json:!0})).then(o=>{s.value=o.data,t.value=!1}).catch(()=>t.value=!1)}),(o,R)=>t.value?(n(),c("div",k,[d(i(g))])):s.value?(n(),p(_(l[i(m).props.settings?.sale_template||"One"]),{key:1,xfetch:e.xfetch,type:"adjustment",editRow:e.editRow,record:s.value,custom_fields:e.custom_fields},null,8,["xfetch","editRow","record","custom_fields"])):(n(),c("div",$,h(o.$t("No data found, the record might not belong to the selected store.")),1))}};export{P as default};
