import{r as o,j as e}from"./app-C417rstp.js";import{A as l,F as d,D as c,k as m,E as r,C as x,e as h,c as p}from"./index-C9OncgsG.js";import{m as t}from"./proxy-Bepa3l_N.js";import{A as g}from"./index-CIV8c8cT.js";const y=(s=0)=>({initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.4,ease:[.22,1,.36,1],delay:s},viewport:{once:!0,amount:.15}}),j=s=>s==="publicado"?"bg-secondary-50 text-secondary-700 border-secondary-200":"bg-primary-50 text-primary-700 border-primary-200",f=s=>new Intl.NumberFormat("es-ES").format(s);function w({pub:s}){const[a,i]=o.useState(!1);return e.jsxs(t.article,{...y(.05),className:"group relative rounded-2xl border border-gray-200 bg-white shadow-sm hover:shadow-md transition-all duration-300 overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary-500 via-primary-500 to-secondary-500"}),e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100 bg-gradient-to-br from-gray-50 to-white",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-semibold border ${j(s.estado)}`,children:[e.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${s.estado==="publicado"?"bg-secondary-500":"bg-primary-500"}`}),s.estado==="publicado"?"Publicado":"En Prensa"]}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 text-xs font-medium text-gray-600",children:[e.jsx(l,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:s.anio})]})]}),s.citadoPor>0&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-secondary-700",children:[e.jsx(d,{className:"w-3.5 h-3.5"}),e.jsxs("span",{children:[f(s.citadoPor)," citas"]})]})]}),e.jsxs("div",{className:"p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900 leading-tight mb-4 group-hover:text-secondary-700 transition-colors",children:s.titulo}),e.jsxs("div",{className:"mb-4 flex items-start gap-2",children:[e.jsx(c,{className:"w-4 h-4 mt-0.5 text-primary-600 flex-shrink-0"}),e.jsx("p",{className:"text-sm text-gray-700 font-medium",children:s.autores})]}),e.jsxs("div",{className:"mb-4 pb-4 border-b border-gray-100 space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[e.jsx(m,{className:"w-4 h-4 mt-0.5 text-secondary-600 flex-shrink-0"}),e.jsx("span",{className:"text-gray-700",children:s.revista})]}),e.jsx("div",{className:"flex items-center gap-2 text-xs text-gray-600 ml-6",children:e.jsx("span",{className:"px-2 py-1 rounded-md bg-gray-100 font-medium",children:s.editorial})})]}),e.jsx("p",{className:"text-sm text-gray-600 leading-relaxed line-clamp-3 mb-4",children:s.extracto}),s.versiones>0&&e.jsxs("div",{className:"mb-4 inline-flex items-center gap-1.5 text-xs text-gray-600 bg-gray-50 px-3 py-1.5 rounded-lg border border-gray-200",children:[e.jsx(r,{className:"w-3.5 h-3.5"}),e.jsxs("span",{children:[s.versiones," ",s.versiones===1?"versión":"versiones"]})]}),e.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-gray-100",children:[e.jsxs("button",{onClick:()=>i(n=>!n),className:"inline-flex items-center gap-1.5 text-sm font-semibold text-primary-700 hover:text-primary-800 transition-colors group/btn",children:[e.jsx(r,{className:"w-4 h-4"}),e.jsx("span",{children:a?"Ver menos":"Ver extracto completo"}),a?e.jsx(x,{className:"w-4 h-4"}):e.jsx(h,{className:"w-4 h-4"})]}),s.url&&e.jsxs("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"ml-auto inline-flex items-center gap-1.5 text-sm font-semibold text-secondary-700 hover:text-secondary-800 transition-colors group/link",children:[e.jsx("span",{children:"Ver publicación"}),e.jsx(p,{className:"w-4 h-4"})]})]}),e.jsx(g,{initial:!1,children:a&&e.jsx(t.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},className:"overflow-hidden",children:e.jsxs("div",{className:"mt-4 rounded-xl border border-secondary-100 bg-secondary-50/30 p-4",children:[e.jsxs("h4",{className:"text-sm font-semibold text-gray-900 mb-2 flex items-center gap-2",children:[e.jsx(r,{className:"w-4 h-4"})," Extracto completo"]}),e.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:s.extracto})]})})})]})]})}export{w as default};
