PageSourceSearch

https://sentinel-365-c9d4f.web.app/assets/CotacoesKanban-DO12uaHq.js

js sentinel-365-c9d4f.web.app collected 2026-10-03 12:38:23 UTC 20,379 bytes, 1 lines download raw bytes

1import{r,j as e,u as Se}from"./react-vendor-pafHdoJx.js";import{a as Ee,b as _,d as N,u as Ae,M as de}from"./index-Db0fDLGN.js";import{A as he}from"./AdaInline-Ct5kRNHe.js";import{p as me,k as O,F as Re,c as D,S as M,a as y,u as pe,l as xe,n as K}from"./primitives-DOiVg4wH.js";import{L as z,l as Te,k as De,bO as Me,bn as $e,x as be,X as fe,w as ve,ap as je,a as ye,M as ue,aC as Pe}from"./ui-vendor-DLXJn6s3.js";import{E as Oe}from"./ErrorState-B9i6eo2M.js";import"./map-vendor-Dr8zbd0c.js";import"./firebase-vendor-D3UzkAhn.js";const Ue=[{value:"geral",label:"Carga geral"},{value:"granel_solido",label:"Granel sólido"},{value:"granel_liquido",label:"Granel líquido"},{value:"frigorificada",label:"Frigorificada"},{value:"conteinerizada",label:"Conteinerizada"},{value:"perigosa",label:"Perigosa"},{value:"neogranel",label:"Neogranel"}],Le=[{value:"vista",label:"À vista"},{value:"15 dias",label:"15 dias"},{value:"30 dias",label:"30 dias"},{value:"45 dias",label:"45 dias"},{value:"60 dias",label:"60 dias"}];function Be({open:a,onClose:o,onCreated:n}){var ne;const[l,d]=r.useState(""),[s,c]=r.useState(""),[b,C]=r.useState(""),[p,g]=r.useState(""),[S,f]=r.useState(""),[h,v]=r.useState(""),[x,E]=r.useState("geral"),[i,u]=r.useState(""),[k,W]=r.useState(""),[G,q]=r.useState(""),[J,X]=r.useState("6"),[Q,H]=r.useState(""),[L,Y]=r.useState(""),[Z,B]=r.useState("30 dias"),[ee,ae]=r.useState(""),[j,$]=r.useState(null),[ke,se]=r.useState(!1),[I,te]=r.useState(!1),[re,oe]=r.useState(null),{user:ze,orgId:We}=Ee(),{data:V}=_(()=>N.tmsEmbarcadores(),[]),A=me(h),w=O(Q),P=Number(J)||6;r.useEffect(()=>{if(!A||!P){$(null);return}se(!0);const t=setTimeout(()=>{N.tmsPisoMinimo(x,P,A).then(ce=>$({pisoKm:ce.pisoKm,pisoTotal:ce.pisoTotal})).catch(()=>$(null)).finally(()=>se(!1))},400);return()=>clearTimeout(t)},[x,P,A]);const R=j?w>=j.pisoTotal:!0,le=j?w-j.pisoTotal:0,ie=!!l&&!!s&&!!p&&A>0&&w>0,m=r.useMemo(()=>(V||[]).find(t=>t.id===l),[V,l]),{data:T}=_(()=>l?N.tmsEmbarcadorTabela(l):Promise.resolve(null),[l]);r.useEffect(()=>{if(!m)return;const t=m.condicaoPagamento;t&&typeof t=="string"&&B(t)},[m]);const we=()=>{d(""),c(""),C(""),g(""),f(""),v(""),E("geral"),u(""),W(""),q(""),X("6"),H(""),Y(""),B("30 dias"),ae(""),$(null)},Fe=async()=>{if(ie){te(!0),oe(null);try{const t=await N.tmsCreateCotacao({embarcadorId:l,embarcadorNome:m==null?void 0:m.razaoSocial,embarcadorCnpj:m==null?void 0:m.cnpj,embarcadorEmail:m==null?void 0:m.email,embarcadorTelefone:m==null?void 0:m.telefone,origemCidade:s.toUpperCase(),origemUf:b,destinoCidade:p.toUpperCase(),destinoUf:S,distanciaKm:A,tipoCarga:x,descricaoCarga:i.toUpperCase(),pesoCarga:me(k),valorCarga:O(G),eixos:P,valorFrete:w,valorPedagio:O(L),valorTotal:w+O(L),pisoMinimo:(j==null?void 0:j.pisoTotal)||0,condicaoPagamento:Z,observacoes:ee});n==null||n((t==null?void 0:t.id)||""),we(),o()}catch(t){oe((t==null?void 0:t.message)||"Falha ao criar cotação.")}finally{te(!1)}}};return e.jsxs(Re,{open:a,onClose:o,title:"Nova cotação",size:"lg",footer:e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:o,className:"px-3 py-2 rounded-lg text-sm hover-surface",style:{color:"var(--page-text)"},children:"Cancelar"}),e.jsxs("button",{onClick:Fe,disabled:!ie||I,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-semibold text-white disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"#F97316"},children:[I?e.jsx(z,{className:"w-4 h-4 animate-spin"}):e.jsx(De,{className:"w-4 h-4"}),I?"Criando…":"Criar cotação (draft)"]})]}),children:[e.jsxs(D,{title:"Embarcador",children:[e.jsx(M,{label:"Cliente",value:l,onChange:d,options:[{value:"",label:"Selecione…"},...(V||[]).map(t=>({value:t.id,label:`${t.razaoSocial}${t.cnpj?" · "+Ie(t.cnpj):""}`}))]}),m&&(((ne=T==null?void 0:T.rotas)==null?void 0:ne.length)||0)>0&&e.jsxs("div",{className:"mt-2 rounded-lg px-3 py-2 text-[11px]",style:{background:"rgba(59,130,246,0.06)",border:"1px solid rgba(59,130,246,0.20)",color:"var(--page-text-muted)"},children:[e.jsxs("span",{style:{color:"var(--page-text)"},children:[T.rotas.length," ",T.rotas.length===1?"rota cadastrada":"rotas cadastradas"," pra este cliente"]})," — ","preencha origem/destino abaixo pra ver se bate com tabela existente."]})]}),e.jsxs(D,{title:"Rota",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[2fr_140px_2fr_140px] gap-2",children:[e.jsx(y,{label:"Origem",value:s,onChange:t=>c(t.toUpperCase()),placeholder:"SÃO PAULO"}),e.jsx(M,{label:"UF",value:b,onChange:C,options:pe()}),e.jsx(y,{label:"Destino",value:p,onChange:t=>g(t.toUpperCase()),placeholder:"RIO DE JANEIRO"}),e.jsx(M,{label:"UF",value:S,onChange:f,options:pe()})]}),e.jsx("div",{className:"mt-2",children:e.jsx(y,{label:"Distância (km)",value:h,onChange:t=>
1v(xe(t)),placeholder:"430",inputMode:"numeric"})})]}),e.jsxs(D,{title:"Carga",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[e.jsx(M,{label:"Tipo",value:x,onChange:E,options:Ue}),e.jsx(y,{label:"Eixos veículo",value:J,onChange:t=>X(t.replace(/\D/g,"").slice(0,1)),placeholder:"6",inputMode:"numeric"})]}),e.jsx("div",{className:"mt-2",children:e.jsx(y,{label:"Descrição",value:i,onChange:t=>u(t.toUpperCase()),placeholder:"SOJA, EQUIPAMENTOS…"})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 mt-2",children:[e.jsx(y,{label:"Peso (kg)",value:k,onChange:t=>W(xe(t)),placeholder:"25.000",inputMode:"numeric"}),e.jsx(y,{label:"Valor da carga",value:G,onChange:t=>q(K(t)),placeholder:"100.000,00",inputMode:"decimal",prefix:"R$"})]})]}),e.jsx(D,{title:"Valor do frete",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[e.jsx(y,{label:"Frete",value:Q,onChange:t=>H(K(t)),placeholder:"4.500,00",inputMode:"decimal",prefix:"R$"}),e.jsx(y,{label:"Pedágio",value:L,onChange:t=>Y(K(t)),placeholder:"350,00",inputMode:"decimal",prefix:"R$"}),e.jsx(M,{label:"Pagamento",value:Z,onChange:B,options:Le})]})}),e.jsx(he,{title:"Piso mínimo ANTT (Lei 13.703/18 + MP 1.343/2026)",body:e.jsx("div",{className:"space-y-1.5 mt-1",children:ke?e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",style:{color:"var(--page-text-muted)"},children:[e.jsx(z,{className:"w-3 h-3 animate-spin"})," Consultando tabela ANTT…"]}):j?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{style:{color:"var(--page-text-muted)"},children:"Piso por km"}),e.jsxs("span",{style:{color:"var(--page-text)"},children:["R$ ",j.pisoKm.toFixed(2).replace(".",","),"/km"]})]}),e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{style:{color:"var(--page-text-muted)"},children:"Piso total da rota"}),e.jsxs("span",{style:{color:"var(--page-text)"},className:"font-semibold",children:["R$ ",j.pisoTotal.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),w>0&&e.jsxs("div",{className:"flex justify-between text-xs items-center pt-1",style:{borderTop:"1px solid var(--border-primary)"},children:[e.jsx("span",{style:{color:"var(--page-text-muted)"},children:"Sua oferta"}),e.jsxs("span",{className:"font-semibold inline-flex items-center gap-1.5",style:{color:R?"#059669":"#DC2626"},children:[!R&&e.jsx(Te,{className:"w-3.5 h-3.5"}),"R$ ",w.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})," ",e.jsxs("span",{className:"text-[10px] opacity-80",children:["(",R?`+R$ ${le.toLocaleString("pt-BR",{minimumFractionDigits:2})} acima`:`R$ ${Math.abs(le).toLocaleString("pt-BR",{minimumFractionDigits:2})} ABAIXO do piso`,")"]})]})]}),!R&&w>0&&e.jsx("p",{className:"text-[11px] mt-1 leading-snug",style:{color:"#DC2626"},children:"⚠ Emissão de CIOT abaixo do piso é bloqueada por padrão (configurável em Compliance → Piso enforcement)."})]}):e.jsx("p",{className:"text-xs",style:{color:"var(--page-text-muted)"},children:"Preencha distância + eixos pra calcular o piso."})}),variant:R?"success":"warn"}),e.jsx(D,{title:"Observações",children:e.jsx(y,{label:"Notas internas",value:ee,onChange:ae,placeholder:"Particularidades da carga, exigências do cliente…"})}),re&&e.jsx("div",{className:"rounded-lg px-3 py-2 text-sm",style:{background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.30)",color:"#EF4444"},children:re})]})}function Ie(a){const o=a.replace(/\D/g,"").padStart(14,"0");return`${o.slice(0,2)}.${o.slice(2,5)}.${o.slice(5,8)}/${o.slice(8,12)}-${o.slice(12)}`}const U={draft:{label:"Rascunho",color:"#94A3B8",icon:be},sent:{label:"Enviada",color:"#3B82F6",icon:ye},accepted:{label:"Aceita",color:"#10B981",icon:je},dispatched:{label:"Despachada",color:"#F97316",icon:ve},refused:{label:"Recusada",color:"#EF4444",icon:fe}};function ea(){const[a,o]=r.useState(0),[n,l]=r.useState(!1),[d,s]=r.useState("kanban"),[c,b]=r.useState("todas"),{data:C,loading:p,error:g,refetch:S}=_(()=>N.tmsCotacoes(),[a]),f=C||[],h=r.useMemo(()=>{const i={draft:[],sent:[],accepted:[],dispatched:[],refused:[]};return f.forEach(u=>{const k=u.status||"draft";i[k]&&i[k].push(u)}),i},[f]),v=r.useMemo(()=>{const i=Date.now()-1728e5;return h.sent.filter(u=>
1{const k=u.enviadoEm?new Date(u.enviadoEm).getTime():0;return k>0&&k<i})},[h.sent]),x=r.useCallback(()=>o(i=>i+1),[]),E=r.useMemo(()=>c==="atrasadas"?v:f,[f,c,v]);return p?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(z,{className:"w-5 h-5 animate-spin",style:{color:"var(--page-text-muted)"}})}):g?e.jsx(Oe,{error:g,onRetry:S,title:"Não foi possível carregar as cotações"}):e.jsxs(e.Fragment,{children:[v.length>=3&&e.jsx("div",{className:"mb-4",children:e.jsx(he,{variant:"warn",title:`${v.length} cotações enviadas há >48h sem resposta`,body:"Abra a lista pra ver quais embarcadores ainda não responderam e mandar o lembrete pelo WhatsApp.",actions:[{label:"Ver lista",onClick:()=>{b("atrasadas"),s("lista")},variant:"primary"}]})}),e.jsxs("div",{className:"flex items-center justify-between mb-4 gap-2 flex-wrap",children:[e.jsxs("h2",{className:"text-base font-semibold",style:{color:"var(--page-text)"},children:[f.length," cotações"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{role:"group","aria-label":"Modo de visualização",className:"inline-flex rounded-lg overflow-hidden",style:{border:"1px solid var(--border-primary)"},children:[e.jsx(ge,{active:d==="kanban",onClick:()=>s("kanban"),icon:Me,label:"Kanban"}),e.jsx(ge,{active:d==="lista",onClick:()=>s("lista"),icon:$e,label:"Lista"})]}),e.jsxs("button",{onClick:()=>l(!0),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium text-white",style:{background:"#F97316"},children:[e.jsx(be,{className:"w-3.5 h-3.5"}),"Nova cotação"]})]})]}),d==="lista"?e.jsx(_e,{rows:E,filter:c,onFilter:b,atrasadasCount:v.length,onAction:x}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3",children:["draft","sent","accepted","dispatched"].map(i=>e.jsx(Ve,{status:i,cotacoes:h[i],onAction:x},i))}),d==="kanban"&&h.refused.length>0&&e.jsxs("details",{className:"mt-4",children:[e.jsxs("summary",{className:"cursor-pointer text-xs px-3 py-2 rounded-lg",style:{color:"var(--page-text-muted)",background:"var(--surface-secondary)"},children:[h.refused.length," cotações recusadas"]}),e.jsx("div",{className:"mt-2 grid grid-cols-1 md:grid-cols-3 gap-2",children:h.refused.map(i=>e.jsx(Ce,{cotacao:i,onAction:x},i.id))})]}),e.jsx(Be,{open:n,onClose:()=>l(!1),onCreated:x})]})}function Ve({status:a,cotacoes:o,onAction:n}){const l=U[a],d=l.icon;return e.jsxs("div",{className:"rounded-xl p-3 min-h-[400px]",style:{background:"var(--surface-secondary)",border:"1px solid var(--border-primary)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(d,{className:"w-3.5 h-3.5",style:{color:l.color}}),e.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider",style:{color:"var(--page-text)"},children:l.label})]}),e.jsx("span",{className:"text-[11px] font-semibold px-1.5 py-0.5 rounded",style:{background:`${l.color}22`,color:l.color},children:o.length})]}),e.jsx("div",{className:"space-y-2",children:o.length===0?e.jsx("div",{className:"text-[11px] text-center py-4",style:{color:"var(--page-text-muted)"},children:"sem cotações"}):o.map(s=>e.jsx(Ce,{cotacao:s,onAction:n},s.id))})]})}function ge({active:a,onClick:o,icon:n,label:l}){return e.jsxs("button",{type:"button",onClick:o,"aria-pressed":a,className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs font-medium transition-colors",style:{background:a?"var(--surface-tertiary)":"transparent",color:a?"var(--page-text)":"var(--page-text-muted)"},children:[e.jsx(n,{className:"w-3.5 h-3.5"}),l]})}function Ke(a){if(!a)return"—";const o=Date.now()-new Date(a).getTime();if(!Number.isFinite(o)||o<0)return"—";const n=Math.floor(o/36e5);return n<24?`${n}h`:`${Math.floor(n/24)}d`}function _e({rows:a,filter:o,onFilter:n,atrasadasCount:l,onAction:d}){return e.jsxs("div",{className:"rounded-xl overflow-hidden",style:{background:"var(--surface-secondary)",border:"1px solid var(--border-primary)"},children:[e.jsx("div",{className:"flex items-center gap-1.5 px-3 py-2",style:{borderBottom:"1px solid var(--border-primary)"},children:[{key:"todas",label:"Todas"},{key:"atrasadas",label:`Enviadas >48h sem resposta${l>0?` (${l})`:""}`}].map(s=>e.jsx("button",{type:"button",onClick:()=>n(s.key),"aria-pressed":o===s.key,className:"text-[11px] px-2 py-1 rounded-md font-medium transition-colors",style:{background:o===s.key?"var(--surface-tertiary)":"transparent",color:o===s.key?"var(--page-text)":"var(--page-text-muted)"},children:s.label},s.key))}),a.length===0?e.jsx("div",{className:"text-xs text-center py-8",style:{color:"var(--page-text-muted)"},children:"Nenhuma cotação neste filtro."}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{style:{color:"var(--page-text-muted)"},children:[e.jsx("th",{className:"text-left font-semibold px-3 py-2",children:"Nº"}),e.jsx("th",{className:"text-left font-semibold px-3 py-2",children:"Embarcador"}),e.jsx("th",{className:"text-left font-semibold px-3 py-2",children:"Rota"}),e.jsx("th",{className:"text-right font-semibold px-3 py-2",children:"Valor"}),e.jsx("th",{className:"text-left font-semibold px-3 py-2",children:"Status"}),e.jsx("th",{className:"text-left font-semibold px-3 py-2",children:"Enviada há"}),e.jsx("th",{className:"text-left font-semibold px-3 py-2",children:"Ações"})]})}),e.jsx("tbody",{children:a.map(s=>{const c=U[s.status]||U.draft;return e.jsxs("tr",{style:{borderTop:"1px solid var(--border-primary)",color:"var(--page-text)"},children:[e.jsx("td",{className:"px-3 py-2 font-mono",style:{color:"var(--page-text-muted)"},children:s.numero}),e.jsx("td",{className:"px-3 py-2 font-semibold",children:s.embarcadorNome||"—"}),e.jsxs("td",{className:"px-3 py-2",style:{color:"var(--page-text-muted)"},children:[s.origemCidade,"/",s.origemUf," → ",s.destinoCidade,"/",s.destinoUf]}),e.jsxs("td",{className:"px-3 py-2 text-right font-bold",style:{color:c.color}
1,children:["R$ ",(s.valorFrete||0).toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded",style:{background:`${c.color}22`,color:c.color},children:c.label})}),e.jsx("td",{className:"px-3 py-2",style:{color:"var(--page-text-muted)"},children:Ke(s.enviadoEm)}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(Ne,{cotacao:s,onAction:d})})]},s.id)})})]})})]})}function Ne({cotacao:a,onAction:o}){const[n,l]=r.useState(!1),[d,s]=r.useState(!1),[c,b]=r.useState(""),C=Se(),{toast:p}=Ae(),g=async i=>{l(!0);try{await i(),o()}catch(u){p({title:"Falha na operação",description:(u==null?void 0:u.message)||"Tente novamente.",kind:"error"})}finally{l(!1)}},S=()=>g(async()=>{await N.tmsEnviarCotacao(a.id),p({title:`Cotação ${a.numero} enviada`,kind:"success"})}),f=()=>g(async()=>{await N.tmsAceitarCotacao(a.id),p({title:`Cotação ${a.numero} aceita`,kind:"success"})}),h=async()=>{const i=c.trim();i&&(s(!1),await g(async()=>{await N.tmsRecusarCotacao(a.id,i),p({title:`Cotação ${a.numero} recusada`,kind:"info"})}),b(""))},v=()=>g(async()=>{await N.tmsDespacharCotacao(a.id,{}),p({title:"Despacho criado",description:"A viagem já aparece em Viagens.",kind:"success"})}),x=()=>g(async()=>{const i=await N.tmsCotacaoWhatsApp(a.id);i!=null&&i.whatsappUrl?(window.open(i.whatsappUrl,"_blank","noopener"),p({title:"Proposta aberta no WhatsApp",description:"Marcada como enviada ao embarcador.",kind:"success"})):p({title:"Sem link do WhatsApp",description:"Embarcador sem telefone cadastrado.",kind:"warning"})}),E=()=>
1{if(!a.dispatchId){p({title:"Viagem não vinculada",description:"Esta cotação não tem despacho associado.",kind:"warning"});return}C("/viagens?tab=em-rota&dispatch="+encodeURIComponent(a.dispatchId))};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-1",children:[a.status==="draft"&&e.jsxs(e.Fragment,{children:[e.jsx(F,{label:"Enviar",icon:ye,onClick:S,disabled:n,primary:!0}),e.jsx(F,{label:"WA",icon:ue,onClick:x,disabled:n})]}),a.status==="sent"&&e.jsxs(e.Fragment,{children:[e.jsx(F,{label:"Aceitar",icon:je,onClick:f,disabled:n,primary:!0}),e.jsx(F,{label:"Recusar",icon:fe,onClick:()=>s(!0),disabled:n,danger:!0}),e.jsx(F,{label:"WA",icon:ue,onClick:x,disabled:n})]}),a.status==="accepted"&&e.jsx(F,{label:"Despachar",icon:ve,onClick:v,disabled:n,primary:!0}),a.status==="dispatched"&&e.jsx(F,{label:"Ver viagem",icon:Pe,onClick:E,disabled:!1})]}),e.jsxs(de,{open:d,onClose:()=>s(!1),title:`Recusar cotação ${a.numero}`,description:"Informe o motivo — fica registrado no histórico da cotação.",intent:"danger",size:"md",children:[e.jsx("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--page-text-secondary)"},htmlFor:`recusa-${a.id}`,children:"Motivo da recusa"}),e.jsx("textarea",{id:`recusa-${a.id}`,className:"input w-full min-h-[96px]",value:c,onChange:i=>b(i.target.value),placeholder:"Ex.: embarcador fechou com outra transportadora",maxLength:500}),e.jsxs("p",{className:"text-[11px] mt-1 text-right",style:{color:"var(--page-text-muted)"},children:[c.length,"/500"]}),e.jsxs(de.Footer,{children:[e.jsx("button",{type:"button",className:"btn-secondary",onClick:()=>s(!1),children:"Cancelar"}),e.jsx("button",{type:"button",className:"px-4 py-2 rounded-xl text-sm font-semibold text-white disabled:opacity-50",style:{background:"#EF4444"},disabled:!c.trim(),onClick:h,children:"Recusar cotação"})]})]})]})}function Ce({cotacao:a,onAction:o}){const n=U[a.status],l=a.pisoMinimo===0||a.valorFrete>=a.pisoMinimo;return e.jsxs("div",{className:"rounded-lg p-2.5 cursor-default",style:{background:"var(--surface-primary)",border:"1px solid var(--border-primary)"},children:[e.jsxs("div",{className:"flex items-start justify-between mb-1.5",children:[e.jsx("span",{className:"text-[11px] font-mono font-semibold",style:{color:"var(--page-text-muted)"},children:a.numero}),!l&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"#FEE2E2",color:"#DC2626"},children:"abaixo do piso"})]}),e.jsx("p",{className:"text-xs font-semibold leading-tight mb-1",style:{color:"var(--page-text)"},children:a.embarcadorNome||"—"}),e.jsxs("p",{className:"text-[11px] mb-2",style:{color:"var(--page-text-muted)"},children:[a.origemCidade,"/",a.origemUf," → ",a.destinoCidade,"/",a.destinoUf]}),e.jsxs("p",{className:"text-sm font-bold mb-2",style:{color:n.color},children:["R$ ",(a.valorFrete||0).toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]}),e.jsx(Ne,{cotacao:a,onAction:o})]})}function F({label:a,icon:o,onClick:n,disabled:l,primary:d,danger:s}){const c=d?"#F97316":s?"transparent":"var(--surface-secondary)",b=d?"#FFF":s?"#EF4444":"var(--page-text)",C=d?"transparent":s?"1px solid rgba(239,68,68,0.3)":"1px solid var(--border-primary)";return e.jsxs("button",{onClick:n,disabled:l,className:"inline-flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded disabled:opacity-50",style:{background:c,color:b,border:C},children:[e.jsx(o,{className:"w-2.5 h-2.5"}),a]})}export{ea as CotacoesKanban};

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.