1import{j as e,K as j,N as v,L as m}from"./react-core-SJCqmpBs.js";import{k as z,r as k,a1 as N,B as x}from"./index-Bafhn_VG.js";import{P as _}from"./PageHero-xjDJB_m3.js";import{S as u}from"./skeleton-DLTN8CiI.js";import{D as w}from"./DocumentBody-OVo707qR.js";import{a as y,u as P}from"./usePublicEducationPlans-C-LjEHka.js";import{r as f}from"./rotuloNormativo-Ds3UNAMq.js";import{a as L,b as $,v as p}from"./substituicaoDePlano-D3QNC5_9.js";import{f as a}from"./dateFormat-BAnhhWY6.js";import{f as C}from"./formatBytes-CTYY4X1o.js";import{F as b,T as D}from"./icons-C_OAd-F2.js";import"./radix-D7sbV9Zm.js";import"./supabase-Dr7v01qy.js";import"./dates-CW3_KQM6.js";import"./animation-9S7D5_Pu.js";import"./dnd-C8Pn-FyI.js";import"./DocumentPdfDialog-Cf-s42lF.js";import"./mappers-DB6IsUD0.js";function E({plan:r}){const s=z(r.normative_file_url);if(!s)return null;const n=f(r)||"Instrumento normativo";return e.jsxs("section",{className:"mt-8 rounded-2xl border border-zinc-200 bg-zinc-50 p-5 dark:border-zinc-800 dark:bg-zinc-900/40",children:[e.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-zinc-500 dark:text-zinc-400",children:"Instrumento normativo"}),e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-flex items-center gap-2 rounded-xl border border-zinc-300 bg-white px-4 py-2.5 text-sm font-medium text-zinc-800 transition-colors hover:border-primary/40 dark:border-zinc-700 dark:bg-card dark:text-zinc-200",children:[e.jsx(b,{className:"size-4 shrink-0","aria-hidden":"true"}),n,r.normative_file_size?e.jsxs("span",{className:"text-xs font-normal text-zinc-500 dark:text-zinc-400",children:["(",C(r.normative_file_size),")"]}):null]})]})}function Y(){const{slug:r}=j(),{company:s,isLoading:n}=k(),{plan:t,isLoading:h,isNotFound:g}=y(r),{plans:c}=P();if(h||n)return e.jsxs("div",{className:"container mx-auto max-w-4xl px-4 py-12",children:[e.jsx(u,{className:"h-8 w-2/3"}),e.jsx(u,{className:"mt-6 h-64 w-full"})]});if(g||!t)return e.jsx(v,{to:"/not-found",replace:!0});const i=t.superseded_at===null?L(t,c):null,l=t.superseded_at!==null?$(t,c):null,o=f(t),d=t.effective_from?t.effective_to?`${a(t.effective_from)} â ${a(t.effective_to)}`:`A partir de ${a(t.effective_from)}`:t.effective_to?`até ${a(t.effective_to)}`:null;return e.jsxs("div",{className:"min-h-screen bg-white dark:bg-background",children:[e.jsxs(N,{children:[e.jsxs("title",{children:[t.title," | ",s?.name??"Educação"]}),t.summary&&e.jsx("meta",{name:"description",content:t.summary})]}),e.jsx(_,{title:t.title,description:t.summary??void 0,icon:b,breadcrumbs:[{label:"Educação",href:"/educacao"},{label:"Planos",href:"/educacao/planos"},{label:t.title}]}),e.jsxs("div",{className:"container mx-auto max-w-4xl px-4 py-12",children:[t.superseded_at!==null&&e.jsxs("div",{className:"mb-8 flex flex-wrap items-center justify-between gap-4 rounded-2xl border border-amber-200 bg-amber-50 p-5 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-medium",children:[e.jsx(D,{className:"size-4 shrink-0","aria-hidden":"true"}),"Este plano foi substituÃdo."]}),l&&e.jsx(x,{asChild:!0,variant:"secondary",size:"sm",children:e.jsx(m,{to:`/educacao/planos/${l.slug}`,children:"Ver o plano vigente"})})]}),(o||t.published_at||d)&&e.jsxs("dl",{className:"mb-8 grid gap-4 rounded-2xl border border-zinc-200 bg-zinc-50 p-6 sm:grid-cols-3 dark:border-zinc-800 dark:bg-zinc-900/40",children:[o&&e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs font-bold uppercase tracking-wider text-zinc-500 dark:text-zinc-400",children:"Instrumento normativo"}),e.jsx("dd",{className:"mt-1 text-sm text-zinc-900 dark:text-white",children:o})]}),t.published_at&&e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs font-bold uppercase tracking-wider text-zinc-500 dark:text-zinc-400",children:"Publicação"}),e.jsx("dd",{className:"mt-1 text-sm text-zinc-900 dark:text-white",children:a(t.published_at)})]}),d&&e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs font-bold uppercase tracking-wider text-zinc-500 dark:text-zinc-400",children:"Vigência"}),e.jsx("dd",{className:"mt-1 text-sm text-zinc-900 dark:text-white",children:d})]})]}),e.jsx("section",{className:"rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm md:p-8 dark:border-zinc-800 dark:bg-card",children:e.jsx(w,{document:t})}),e.jsx(E,{plan:t}),i&&e.jsx("div",{className:"mt-6 flex justify-end",children:e.jsx(x,{asChild:!0,variant:"secondary",size:"sm",children:e.jsxs(m,{to:`/educacao/planos/${i.slug}`,children:["Plano anterior",p(i)?` (${p(i)})`:""]})})})]})]})}export{Y as PlanoDetalhe};
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.