1import{O as o,Q as t,S as B}from"./vendor-H79NKlR3.js";import{C as H}from"./ChecklistFlightPicker-CL0r-3wB.js";import{u as z,F as A,f as S,a as L,b as U}from"./FocV2SaveState-Vr2mtYC8.js";import{dE as P,d0 as x,cZ as p,dH as l,dB as V,cW as d,cY as Y,dD as s}from"./ProtectedAppRoutes-BMv270TH.js";import"./vendor-charts-Dhre_-zM.js";import"./vendor-date-D2dqegYk.js";import"./dateOnly-BhLAIb68.js";import"./FlightAgenda-BWf_Q6X4.js";import"./preload-helper-BXl3LOEh.js";import"./airports-BLBniQEi.js";import"./index-Bqcvp0_M.js";import"./vendor-net-XAFgdCjt.js";import"./airportTime-BryuiW0a.js";import"./budgetPlans-xBo40jcS.js";import"./flightLogs-PBM-qw9n.js";import"./flightNumber-BzrLDv-A.js";import"./legInternational-CL07l4DD.js";import"./pavementAcrPcr-Bb6Y4vls.js";import"./airportEvaluationModel-DaOqur68.js";import"./segmentProjection-CqC4blS-.js";import"./dayOperation-B62Ohzg8.js";import"./flightChecklists-jfm2diSn.js";import"./aircraft-BPto4rHo.js";import"./pilots-AW__aHYj.js";import"./flightAgendaPassengers-Bn8chgtP.js";import"./aogEvents-B4SfL73O.js";import"./reactiveMaintenance-QCfZi4Oa.js";import"./dutyExceedance-CvYPFLxU.js";import"./guideSpotlight-BH2BycC6.js";import"./maintenance-BxoEH-3y.js";import"./pilotCurrency-52Kc9Hgr.js";import"./financeiroScope-BlAcWZIU.js";import"./useSolicitorRegistry-wBnZKRh1.js";import"./SolicitorFormDialog-6C_NrSEw.js";import"./entryProvenance-DSs4aAl6.js";import"./FinanceDocumentViewer-KwM9sHNj.js";import"./FinanceiroChrome-DVh6URvu.js";import"./currencies-DreAZFDB.js";import"./CookieConsentManager-BVZ8cDwn.js";const m=r=>String(r||"").trim().toUpperCase(),w={past:{bg:s,border:s,color:"var(--color-bg)"},urgent:{bg:s,border:s,color:"var(--color-bg)"},soon:{bg:"transparent",border:p.hard,color:"var(--color-text)"},normal:{bg:"transparent",border:p.hard,color:"var(--color-text)"}};function i({label:r,value:e}){return o.jsxs(t,{component:"span",sx:{fontFamily:l,fontSize:"13px",letterSpacing:"0.08em",textTransform:"uppercase",p:"5px 9px",border:`1px solid ${p.hard}`,bgcolor:"transparent",color:"var(--color-text)",whiteSpace:"nowrap",borderRadius:x.chip,display:"inline-flex",alignItems:"center",gap:"5px"},children:[o.jsx(t,{component:"span",sx:{color:d.muted},children:r}),e]})}function Z(r){const e=L(r);if(!e)return"";const a=r instanceof Date?r:new Date(r);return Number.isNaN(a.getTime())?e:`${a.toLocaleDateString("pt-BR",{weekday:"short"})}, ${e}`}function q({target:r,now:e}){const a=U(r,e);if(!a)return null;const n=w[a.tone]||w.normal;return o.jsx(t,{component:"span","data-testid":"foc-v2-etd-countdown",sx:{fontFamily:l,fontSize:"13px",fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",p:"5px 9px",border:`1px solid ${n.border}`,bgcolor:n.bg,color:n.color,whiteSpace:"nowrap",borderRadius:x.chip},children:`ETD ${a.label}`})}function Ir({flight:r,checklist:e,onArchive:a,saveState:n="idle",savedAt:T=null,saveError:y="",onRetrySave:C,flightOptions:N=[],currentFlightId:v,currentFlightLabel:u,flightsLoading:D=!1,flightsError:E="",onSelectFlight:f}){const c=e||{},F=z(),O=m(r?.departure_airport)||"----",W=m(r?.arrival_airport)||"----",b=m(r?.alternate_airport),I=r?.aircraft_details?.model||r?.aircraft_details?.aircraft_type||r?.aircraft_model||r?.aircraft_name||"",R=r?.aircraft_registration||r?.aircraft_tail||"",g=c?.flight_plan_route_json?.eet||c?.flight_plan_route_json?.total_eet||c?.flight_plan_route_json?.navlog?.ete_hhmm||"",_=r?.commander_name||r?.commander||"",j=r?.copilot_name||r?.copilot||"",k=Z(r?.flight_date||r?.departure_time),$=(u||r?.flight_number||"FOC").toString(),h=[k,R,I,_?`CMD ${_}`:null,j?`SIC ${j}`:null].filter(Boolean).join(" · ");return o.jsxs(t,{id:"foc-v2-cmd-header",component:"header",className:"blueprint",sx:{bgcolor:"transparent",border:`1px solid ${p.hard}`,borderRadius:x.card,boxShadow:P.card,p:{xs:"12px 14px",md:"14px 18px"},mb:1.25,color:"var(--color-text)",display:"flex",flexDirection:"column",gap:1.25},children:[o.jsx("i",{className:"corner tl"}),o.jsx("i",{className:"corner tr"}),o.jsx("i",{className:"corner bl"}),o.jsx("i",{className:"corner br"}),o.jsxs(t,{sx:{display:"flex",alignItems:"center",gap:1.25,flexWrap:"wrap"},children:[o.jsx(t,{sx:{display:"flex",alignItems:"center",gap:1.25},children:o.jsx(t,{component:"span",sx:{fontFamily:l,fontSize:"13px",fontWeight:600,letterSpacing:"0.2em",textTransform:"uppercase",color:"color-mix(in srgb, var(--color-text) 62%, transparent)",whiteSpace:"nowrap"},children:"Zulbot · Checklist operacional por vÃdeo chamada"})}),o.jsx(t,{sx:{flex:1}}),o.jsx(A,{state:n,savedAt:T,error:y,onRetry:C}),f?o.jsx(H,{flights:N,currentFlightId:v,currentFlightLabel:u,loading:D,error:E,onSelectFlight:f}):null,a?o.jsx(t,{component:"button",type:"button",onClick:a,sx:V,children:"Arquivar FOC"}):null]}),o.jsxs(t,{sx:{display:"flex",alignItems:"flex-end",gap:{xs:2,lg:3},flexWrap:"wrap"},children:[o.jsxs(t,{sx:{minWidth:260},children:[o.jsxs(B,{component:"h1",sx:{m:0,fontFamily:Y,fontSize:{xs:"26px",md:"34px"},fontWeight:600,letterSpacing:"-0.02em",color:d.strong,lineHeight:1.05},children:[$," · ",O," â ",W]}
1),h?o.jsx(t,{sx:{fontFamily:l,fontSize:"13px",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted,mt:"5px"},children:h}):null]}),o.jsx(t,{sx:{flex:1}}),o.jsxs(t,{sx:{display:"flex",gap:.9,flexWrap:"wrap",alignItems:"center"},children:[o.jsx(i,{label:"ETD",value:S(r?.departure_time)}),o.jsx(i,{label:"ETA",value:S(r?.arrival_time)}),g?o.jsx(i,{label:"EET",value:g}):null,b?o.jsx(i,{label:"ALTN",value:b}):null,o.jsx(q,{target:r?.departure_time,now:F})]})]})]})}export{Ir 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.