import{n as e,t}from"./jsx-runtime-BrKkGzFB.js";import{t as n}from"./utils--B3oMbdy.js";import{Dt as r,Et as i,i as a,r as o}from"./app-KzKSswgw.js";var s=e(),c=t();function l(e){return e?new Intl.DateTimeFormat(`es`,{day:`numeric`,month:`long`,year:`numeric`}).format(new Date(e)):null}function u(e){let t=(0,s.c)(28),{document:u,links:d}=e,f;t[0]===u.updated_at?f=t[1]:(f=l(u.updated_at),t[0]=u.updated_at,t[1]=f);let p=f,m;t[2]===u.title?m=t[3]:(m=(0,c.jsx)(i,{title:u.title}),t[2]=u.title,t[3]=m);let h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,c.jsx)(`p`,{className:`text-sm font-medium text-primary`,children:`Documento legal`}),t[4]=h):h=t[4];let g;t[5]===u.title?g=t[6]:(g=(0,c.jsx)(`h1`,{className:`text-3xl font-semibold tracking-tight`,children:u.title}),t[5]=u.title,t[6]=g);let _;t[7]===p?_=t[8]:(_=p?(0,c.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Última actualización: `,p]}):null,t[7]=p,t[8]=_);let v;t[9]!==g||t[10]!==_?(v=(0,c.jsxs)(`header`,{className:`space-y-3`,children:[h,g,_]}),t[9]=g,t[10]=_,t[11]=v):v=t[11];let y;t[12]===u.body?y=t[13]:(y=(0,c.jsx)(o,{children:(0,c.jsx)(a,{className:`pt-6`,children:(0,c.jsx)(`article`,{className:`text-sm leading-7 text-foreground [&_a]:text-primary [&_a]:underline [&_blockquote]:my-4 [&_blockquote]:border-l-4 [&_blockquote]:pl-4 [&_blockquote]:text-muted-foreground [&_h2]:mt-8 [&_h2]:mb-3 [&_h2]:text-2xl [&_h2]:font-semibold [&_h3]:mt-6 [&_h3]:mb-2 [&_h3]:text-xl [&_h3]:font-semibold [&_li]:ml-6 [&_ol]:my-3 [&_ol]:list-decimal [&_p]:my-3 [&_ul]:my-3 [&_ul]:list-disc`,dangerouslySetInnerHTML:{__html:u.body}})})}),t[12]=u.body,t[13]=y);let b;if(t[14]!==u.title||t[15]!==d){let e;t[17]===u.title?e=t[18]:(e=e=>(0,c.jsx)(r,{href:e.href,className:n(`rounded-full border px-4 py-2 transition-colors`,e.title===u.title?`border-primary bg-primary/10 text-foreground`:`border-border text-muted-foreground hover:bg-muted hover:text-foreground`),children:e.title},e.key),t[17]=u.title,t[18]=e),b=d.map(e),t[14]=u.title,t[15]=d,t[16]=b}else b=t[16];let x;t[19]===b?x=t[20]:(x=(0,c.jsx)(`nav`,{className:`flex flex-wrap gap-3 text-sm`,"aria-label":`Documentos legales`,children:b}),t[19]=b,t[20]=x);let S;t[21]!==v||t[22]!==y||t[23]!==x?(S=(0,c.jsxs)(`div`,{className:`space-y-8`,children:[v,y,x]}),t[21]=v,t[22]=y,t[23]=x,t[24]=S):S=t[24];let C;return t[25]!==S||t[26]!==m?(C=(0,c.jsxs)(c.Fragment,{children:[m,S]}),t[25]=S,t[26]=m,t[27]=C):C=t[27],C}export{u as default};