import{t as e}from"./editable-business-trip-CtyigzMk.js";import{Eu as t,Ln as n,Nl as r,Od as i,Pd as a,rr as o,tr as s,yo as c,zd as l}from"./index-Q5R6-AeA.js";import{t as u}from"./page-layout-Cl29SycZ.js";var d=l(a(),1),f=t(),p=({businessTripId:t})=>{let{businessTripId:a}=i(),{setFiltersContext:l}=(0,d.useContext)(s),p=t??a??``,[{data:m,fetching:h}]=r({query:c,variables:{businessTripId:p}});return(0,d.useEffect)(()=>{l((0,f.jsx)(`div`,{className:`flex flex-row gap-x-5`,children:(0,f.jsx)(n,{filename:`business_trip_report`})}))},[m,h,l]),h||!m?.businessTrip?(0,f.jsx)(o,{}):(0,f.jsx)(u,{title:`Business Trip: ${m.businessTrip.name}`,description:`Manage business trip`,children:(0,f.jsx)(`div`,{children:p&&(0,f.jsx)(e,{tripId:p,isExtended:!0})})})};export{p as BusinessTrip};