import{_ as F}from"./Datx2FeS.js";import{_ as K}from"./DoynWEhY.js";import{_ as w}from"./Cbzvl3uk.js";import{u as V,_ as B}from"./KnKI0YOK.js";import{_ as P}from"./DW2OqR52.js";import{a as c}from"./BRY5UTQQ.js";import{f as g}from"./DcOKUJR4.js";import T from"./B7Hqpkvs.js";import{A as d}from"./DJzKbefB.js";import{d as j,P as N,b as m,w as M,o as r,e as i,a as O,E as k,f as l,g as t,l as U}from"./dVzHJMF1.js";const R={class:"base-grid"},S={class:"col-span-12 lg:col-span-5 grid grid-cols-2 gap-4 h-fit"},G={key:0,class:"lg:col-span-2"},I={class:"col-span-12 lg:col-span-7"},J=j({__name:"CardLocalizacao",props:{monitoracao:{},showMunicipio:{type:Boolean,default:!1}},async setup(p){let s,v;const{mapData:u,geojson:z}=([s,v]=N(()=>V({tipoAtivo:p.monitoracao.tipoAtivo,additionalFilters:{anoConcessao:p.monitoracao.anoConcessao}})),s=await s,v(),s);return(o,a)=>{const n=T,A=F,L=K,E=w,C=B,D=P;return r(),m(D,{title:"Localização"},{default:M(()=>{var f,y,_,b;return[i("div",R,[i("div",S,[i("div",null,[a[1]||(a[1]=i("label",{for:"localizacao_rodovia"},"Rodovia:",-1)),l(n,{id:"localizacao_rodovia",type:"text",value:(f=o.monitoracao.rodovia)==null?void 0:f.descricao,"read-only":"",disabled:""},null,8,["value"])]),i("div",null,[a[2]||(a[2]=i("label",{for:"localizacao_uf"},"UF:",-1)),l(n,{id:"localizacao_uf",type:"text",value:(y=o.monitoracao.rodovia)==null?void 0:y.uf,disabled:"","read-only":""},null,8,["value"])]),i("div",null,[a[3]||(a[3]=i("label",{for:"localizacao_sentido"},"Sentido:",-1)),l(n,{id:"localizacao_sentido",type:"text",value:t(d).Enums.TipoSentido[o.monitoracao.sentido],disabled:"","read-only":""},null,8,["value"])]),i("div",null,[a[4]||(a[4]=i("label",{for:"localizacao_direcao"},"Direção:",-1)),l(n,{id:"localizacao_direcao",type:"text",value:t(d).Enums.TipoDirecao[o.monitoracao.direcao],disabled:"","read-only":""},null,8,["value"])]),i("div",null,[a[5]||(a[5]=i("label",{for:"localizacao_km_inicial"},"KM inicial:",-1)),l(n,{id:"localizacao_km_inicial",type:"text",value:("applyKmEstacaMask"in o?o.applyKmEstacaMask:t(c))(o.monitoracao.kmInicial),disabled:"","read-only":""},null,8,["value"])]),i("div",null,[a[6]||(a[6]=i("label",{for:"localizacao_km_final"},"KM final:",-1)),l(n,{id:"localizacao_km_final",type:"text",value:("applyKmEstacaMask"in o?o.applyKmEstacaMask:t(c))(o.monitoracao.kmFinal),disabled:"","read-only":""},null,8,["value"])]),i("div",null,[a[7]||(a[7]=i("label",{for:"localizacao_latitude_inicial"},"Latitude:",-1)),l(n,{id:"localizacao_latitude_inicial",type:"text",value:("formatLatLng"in o?o.formatLatLng:t(g))(o.monitoracao.latitude),disabled:"","read-only":""},null,8,["value"])]),i("div",null,[a[8]||(a[8]=i("label",{for:"localizacao_longitude_inicial"},"Longitude:",-1)),l(n,{id:"localizacao_longitude_inicial",type:"text",value:("formatLatLng"in o?o.formatLatLng:t(g))(o.monitoracao.longitude),disabled:"","read-only":""},null,8,["value"])]),i("div",null,[a[9]||(a[9]=i("label",{for:"localizacao_km_estacao"},"KM referencial:",-1)),l(n,{id:"localizacao_km_estacao",type:"text",value:("applyKmEstacaMask"in o?o.applyKmEstacaMask:t(c))(o.monitoracao.kmReferencial),disabled:"","read-only":""},null,8,["value"])]),i("div",null,[a[10]||(a[10]=i("label",{for:"pista"},"Tipo de pista:",-1)),l(n,{id:"pista",class:"w-full",value:t(d).Enums.TipoPistaAtivo[o.monitoracao.pista],disabled:""},null,8,["value"])]),i("div",null,[a[11]||(a[11]=i("label",{for:"canteiro-central"},"No canteiro central:",-1)),l(n,{id:"canteiro-central",class:"w-full",value:t(d).Enums.EpsOae[(_=o.monitoracao.elemento)==null?void 0:_.noCanteiroCentral],disabled:""},null,8,["value"])]),o.showMunicipio?(r(),O("div",G,[a[12]||(a[12]=i("label",{for:"municipio"},"Município:",-1)),l(n,{id:"municipio",class:"w-full",value:(b=o.monitoracao.elemento)==null?void 0:b.municipio,disabled:""},null,8,["value"])])):k("",!0)]),i("div",I,[l(C,{modelValue:t(u),"onUpdate:modelValue":a[0]||(a[0]=e=>U(u)?u.value=e:null),geojson:t(z).response.value,"is-marker-highlighted":e=>e.idMonitoracao===o.monitoracao.id.idMonitoracao,center:o.monitoracao.latitude&&o.monitoracao.longitude?[o.monitoracao.latitude,o.monitoracao.longitude]:void 0,zoomed:""},{popup:M(({feature:e})=>[o.monitoracao.tipoAtivo==="FDA"?(r(),m(A,{key:0,feature:e,"id-monitoracao-atual":o.monitoracao.id.idMonitoracao},null,8,["feature","id-monitoracao-atual"])):o.monitoracao.tipoAtivo==="FDC"?(r(),m(L,{key:1,feature:e,"id-monitoracao-atual":o.monitoracao.id.idMonitoracao},null,8,["feature","id-monitoracao-atual"])):o.monitoracao.tipoAtivo==="FDO"?(r(),m(E,{key:2,feature:e,"id-monitoracao-atual":o.monitoracao.id.idMonitoracao},null,8,["feature","id-monitoracao-atual"])):k("",!0)]),_:1},8,["modelValue","geojson","is-marker-highlighted","center"])])])]}),_:1})}}}),oo=Object.assign(J,{__name:"AtivosMonitoracoesFaixaDominioCardLocalizacao"});export{oo as _};
