1import{c as s,o,a,e as N,x as z,r as l,g as V,k as c,w as D,I as B,b as g,F as m,y as _,D as f,d as h,l as A,K as y,t as r,G as M}from"./CvemYG_Q.js";import{_ as E}from"./BX667_EQ.js";import{_ as F}from"./jXfSnPom.js";import{_ as L}from"./CO3DLzxH.js";import{_ as R}from"./DTAq21Nd.js";import{r as S}from"./CylTRyOk.js";import{r as q}from"./D5AD8vHU.js";import{r as I}from"./DTyE9Eau.js";import"./Vddydf-6.js";import"./Dn-emQpU.js";import"./DAHQVA3K.js";import"./CbHPDAZD.js";import"./DESD8SE_.js";import"./ZhWAdK_X.js";import"./C9IE-Q44.js";import"./nTYllMY_.js";import"./jc0MLXVe.js";import"./DjmAnJqL.js";function P(v,p){return o(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m7.875 14.25 1.214 1.942a2.25 2.25 0 0 0 1.908 1.058h2.006c.776 0 1.497-.4 1.908-1.058l1.214-1.942M2.41 9h4.636a2.25 2.25 0 0 1 1.872 1.002l.164.246a2.25 2.25 0 0 0 1.872 1.002h2.092a2.25 2.25 0 0 0 1.872-1.002l.164-.246A2.25 2.25 0 0 1 16.954 9h4.636M2.41 9a2.25 2.25 0 0 0-.16.832V12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 12V9.832c0-.287-.055-.57-.16-.832M2.41 9a2.25 2.25 0 0 1 .382-.632l3.285-3.832a2.25 2.25 0 0 1 1.708-.786h8.43c.657 0 1.281.287 1.709.786l3.284 3.832c.163.19.291.404.382.632M4.5 20.25h15A2.25 2.25 0 0 0 21.75 18v-2.625c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125V18a2.25 2.25 0 0 0 2.25 2.25Z"})])}const T={class:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4"},Z=["onClick"],j={class:"flex items-center gap-2 text-xs font-medium text-gray-500"},G={class:"mt-3 text-3xl font-extrabold text-gray-900"},H={class:"mt-6 rounded-2xl border border-gray-200 bg-white p-5 shadow-sm"},J={key:0,class:"py-6 text-center text-sm text-gray-500"},K={key:1,class:"divide-y divide-gray-100"},O={class:"min-w-0 flex-1"},Q={class:"flex flex-wrap items-center gap-2 text-xs"},U={class:"font-semibold text-gray-800"},W={class:"rounded-full bg-indigo-50 px-2 py-0.5 font-medium text-indigo-700"},X={key:0},Y={class:"mt-1 line-clamp-1 text-sm text-gray-600"},he=N({__name:"dashboard",setup(v){const{$axios:p}=z(),u=B(),n=l(!0),x=l({a_revisar:0,prazo_proximo:0,decididas:0,exigiram_mudanca:0}),d=l([]),b=t=>({federal:"Federal",confaz:"CONFAZ",estadual:"Estadual"})[t]||t||"-",k=t=>{if(!t)return"sem data";const i=new Date(t);return isNaN(i.getTime())?t:i.toLocaleDateString("pt-BR")},w=async()=>{n.value=!0;try{const{data:t}=await p.get("/radar/contador/dashboard");x.value=t.cards,d.value=t.urgentes||[]}catch(t){console.error("Erro ao carregar o dashboard do contador:",t)}finally{n.value=!1}},C=[{key:"a_revisar",label:"Normas a revisar",icon:P,cor:"text-indigo-600",to:"pendente"},{key:"prazo_proximo",label:"Com prazo nos próximos 30 dias",icon:S,cor:"text-amber-600",to:"pendente"},{key:"decididas",label:"Já revisadas",icon:q,cor:"text-emerald-600",to:"decidida"},{key:"exigiram_mudanca",label:"Exigiram mudança na emissão",icon:I,cor:"text-rose-600",to:"decidida"}];return V(w),(t,i)=>(o(),c(E,{size:"fluid"},{default:D(()=>[g(F,{title:"InÃcio",subtitle:"Sua fila de normas para validar, com o que é mais urgente primeiro."}),n.value?(o(),c(R,{key:0,size:"lg",centered:""})):(o(),s(m,{key:1},[a("div",T,[(o(),s(m,null,_(C,e=>a("button",{key:e.key,type:"button",class:"rounded-2xl border border-gray-200 bg-white p-5 text-left shadow-sm transition hover:border-indigo-300 hover:shadow",onClick:$=>f(u).push(`/contador/normas?status=${e.to}`)},[a("div",j,[(o(),c(A(e.icon),{class:y(["h-4 w-4",e.cor])},null,8,["class"])),h(" "+r(e.label),1)]),a("div",G,r(x.value[e.key]),1)],8,Z)),64))]),a("div",H,[i[0]||(i[0]=a("h2",{class:"mb-1 text-sm font-semibold text-gray-800"},"Precisam de você primeiro",-1)),i[1]||(i[1]=a("p",{class:"mb-4 text-xs text-gray-500"}," Pendentes ordenadas pela data em que começam a valer (prazo mais curto no topo). ",-1)),d.value.length?(o(),s("ul",K,[(o(!0),s(m,null,_(d.value,e=>(o(),s("li",{key:e.id,class:"flex flex-wrap items-center gap-x-4 gap-y-2 py-3"},[a("div",O,[a("div",Q,[a("span",U,r(e.tipo)+" "+r(e.numero),1),a("span",W,[h(r(b(e.esfera)),1),e.uf?(o(),s("span",X," · "+r(e.uf),1)):M("",!0)]),a("span",{class:y(["rounded-full px-2 py-0.5 font-medium",e.vigencia?"bg-amber-50 text-amber-700":"bg-gray-100 text-gray-500"])}," Começa a valer: "+r(k(e.vigencia)),3)]),a("p",Y,r(e.ementa),1)]),g(L,{label:"Revisar",size:"sm",onClick:$=>f(u).push(`/contador/normas/${e.id}`)},null,8,["onClick"])]))),128))])):(o(),s("p",J," Nada pendente. Você está em dia! ð "))])],64))]),_:1}))}});
1export{he 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.