1import{u as x,a as y,an as _,bE as $,bF as j,r as c,S as l,c9 as N,ca as S,cb as g,j as n,L as C,bO as k,c6 as E,bS as I,ce as q}from"./index-D1LcTXUm.js";import"./vendor-CWc6w16D.js";function F(){const o=x(),{pathname:v}=y(),i=v.startsWith("/developer")?"/developer":"/admin",{shippingCompanyId:r,contractId:e}=_(),{get:f,loading:a,data:u}=$(),s=r||(u==null?void 0:u.shipping_company_id),{get:h,loading:p,data:t}=j(s||void 0);c.useEffect(()=>{e&&!r&&(f(e),l.set("contractId",e))},[e,r,f]),c.useEffect(()=>{if(e&&s)return l.set("contractId",e),h(e),()=>{l.remove("contractId")}},[e,s,h]);const m=c.useMemo(()=>s?`contract/${e}/shipping-company/${s}`:`contract/${e}`,[e,s]),b=c.useMemo(()=>`${i}/${m}`,[i,m]);c.useEffect(()=>{a||s&&p||!e||!(t!=null&&t.status)||(!N(t.status)||!S(t.requires_checklist))&&o(b,{replace:!0})},[b,e,t==null?void 0:t.status,t==null?void 0:t.requires_checklist,s,p,a,o]);const d=c.useMemo(()=>e?s?`${i}/contract/${e}/shipping-company/${s}/debits`:`${i}/contract/${e}/debits`:i,[e,s,i]);return c.useEffect(()=>{g()||o(d,{replace:!0})},[o,d]),g()?a||s&&p||!e?n.jsx(C,{}):n.jsxs("div",{className:"space-y-6 sm:space-y-8",children:[n.jsx("div",{className:"py-2 sm:py-4 overflow-x-hidden",children:t&&n.jsx(k,{contractNumber:t==null?void 0:t.contract_number,subtitle:"Novo débito",status:t==null?void 0:t.status,icon:E,className:"!mb-0",disabledNotifications:t==null?void 0:t.disable_notifications,hiringMode:t==null?void 0:t.hiring_mode,contractWaveContext:t})}),n.jsx(I,{route:m,active:"four",contractStatus:t==null?void 0:t.status,contractHasAssignedDriver:!!(t!=null&&t.driver_id),contractCandidates:t==null?void 0:t.contract_candidate,requiresChecklist:t==null?void 0:t.requires_checklist}),n.jsx(q,{contractId:e,shippingCompanyId:s,backTo:d})]}):n.jsx(C,{})}export{F as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.