import{An as e,E as t,Nn as n,On as r,Qt as i,Ut as a,W as o,_n as s,a as c,an as l,c as u,d,en as f,l as p,mn as m,nn as h,o as g,on as _,rn as v,s as y,tn as b,u as x,wn as S,xn as C}from"./app-4kCgdoJR.js";var w={key:0,class:`relative h-64`},T={class:`flex gap-1 text-sm`},E={class:`truncate hover:text-clip print:block print:text-clip`,dir:`rtl`},D={class:`mx-4 mb-4 rounded-md border border-gray-200 bg-gray-50 px-5 py-4 dark:border-gray-700 dark:bg-gray-950`},O={class:`text-sm font-bold`},k={class:`text-lg font-semibold`},A={key:0,class:`text-lg font-semibold`},j={class:`flex gap-1 text-lg`},M={class:`mt-1`},N={class:`font-bold`},P={class:`mt-1`},F={class:`font-bold`},I={class:`mt-1`},L={class:`font-bold`},R={key:2,class:`flex min-h-64 items-center justify-center p-6 text-lg font-thin`},z={__name:`QuickView`,props:[`current`,`custom_fields`,`editRow`,`xfetch`],setup(z){let B=a(),V=z,H=r(!0),U=r(null),W={One:u,Two:c,Three:g,Four:x,Five:d,Six:y,Minimal:p};return m(async()=>{V.xfetch?(U.value=V.current,H.value=!1):await o.get(route(`deliveries.show`,{delivery:V.current.id,json:!0})).then(e=>{U.value=e.data,H.value=!1}).catch(()=>H.value=!1)}),(r,a)=>H.value?(s(),v(`div`,w,[_(e(t))])):U.value?(s(),b(C(W[e(B).props.settings?.sale_template||`One`]),{key:1,type:`delivery`,xfetch:z.xfetch,record:U.value,editRow:z.editRow,custom_fields:z.custom_fields},{"header-extra":S(()=>[f(`div`,T,[l(n(r.$t(`Sale Reference`))+`: `,1),f(`p`,E,n(U.value.sale?.reference),1)])]),amount:S(({record:e})=>[f(`div`,D,[f(`div`,O,n(r.$t(`Address`))+`:`,1),f(`div`,k,n(e.address?.company||e.address?.name),1),e.address?.company?(s(),v(`div`,A,n(r.$t(`Attn`))+`: `+n(e.address?.name),1)):h(``,!0),f(`div`,j,[f(`span`,null,n(r.$address(e.address)),1)]),e.delivered_at?(s(),v(i,{key:1},[f(`div`,M,[l(n(r.$t(`Delivered at`))+`: `,1),f(`span`,N,n(r.$datetime(e.delivered_at)),1)]),f(`div`,P,[l(n(r.$t(`Delivered by`))+`: `,1),f(`span`,F,n(e.delivered_by||``),1)]),f(`div`,I,[l(n(r.$t(`Received by`))+`: `,1),f(`span`,L,n(e.received_by||``),1)])],64)):h(``,!0)])]),_:1},8,[`xfetch`,`record`,`editRow`,`custom_fields`])):(s(),v(`div`,R,n(r.$t(`No data found, the record might not belong to the selected store.`)),1))}};export{z as default};