1import{t as i,u as y,j as e,L as m,n as l,m as f,B as u}from"./index-DRYNtDfq.js";import{U as b,P as C,a as B}from"./PageLayout-BT1vZgiA.js";import{F as j}from"./folder-Bb0itT2l.js";import{C as v}from"./chevron-left-mvqxhe1t.js";import{F as r}from"./file-text-CvyTzFOR.js";import{C as w}from"./calendar-B5BYcSdL.js";import"./chevron-right-C0SJQso0.js";function k(){return e.jsx("div",{"data-loc":"client/src/pages/BlogCategory.tsx:11",style:{width:"100%",height:"100%",background:"linear-gradient(135deg,#f3f4f6,#e9d5ff)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(r,{"data-loc":"client/src/pages/BlogCategory.tsx:12",style:{width:28,height:28,color:"#c4b5fd"}})})}function T(){return e.jsxs("div",{"data-loc":"client/src/pages/BlogCategory.tsx:19",style:{borderRadius:14,overflow:"hidden",background:"#f3f4f6"},children:[e.jsx("div",{"data-loc":"client/src/pages/BlogCategory.tsx:20",style:{aspectRatio:"16/9",background:"#e5e7eb"}}),e.jsxs("div",{"data-loc":"client/src/pages/BlogCategory.tsx:21",style:{padding:16,display:"flex",flexDirection:"column",gap:8},children:[e.jsx("div",{"data-loc":"client/src/pages/BlogCategory.tsx:22",style:{height:14,background:"#e5e7eb",borderRadius:4,width:"90%"}}),e.jsx("div",{"data-loc":"client/src/pages/BlogCategory.tsx:23",style:{height:12,background:"#e5e7eb",borderRadius:4,width:"70%"}})]})]})}function $({params:c}){const{slug:o}=c,{data:n}=i.blog.getCategories.useQuery(),a=n?.find(t=>t.slug===o),{data:g,isLoading:d}=i.blog.list.useQuery({categorySlug:o,limit:50},{enabled:!!o}),x=a?.seoTitle||(a?`${a.name} - Tin tức DoiNhanh`:`Danh mục: ${o}`),p=a?.metaDescription||a?.description||`Tá»ng hợp bà i viết vá» ${a?.name||o} - hưá»ng dẫn, mẹo vặt và tin tức má»i nhất từ DoiNhanh.com`;y({title:x,description:p,canonical:`https://doinhanh.com/tin-tuc/danh-muc/${o}`,ogType:"website",breadcrumbs:[{name:"Trang chá»§",url:"/"},{name:"Tin tức",url:"/tin-tuc"},{name:a?.name||o}]});const s=g||[];return e.jsx(m,{"data-loc":"client/src/pages/BlogCategory.tsx:58",children:e.jsxs(b,{"data-loc":"client/src/pages/BlogCategory.tsx:59",children:[e.jsx(C,{"data-loc":"client/src/pages/BlogCategory.tsx:60",items:[{label:"Tin tức",href:"/tin-tuc"},{label:a?.name||o}]}),e.jsx(B,{"data-loc":"client/src/pages/BlogCategory.tsx:67",title:a?.name||o,subtitle:a?.description||`Tá»ng hợp bà i viết vá» ${a?.name||o}`,icon:e.jsx(j,{"data-loc":"client/src/pages/BlogCategory.tsx:70",style:{width:20,height:20}})}),e.jsx("div",{"data-loc":"client/src/pages/BlogCategory.tsx:74",style:{marginBottom:20},children:e.jsx(l,{"data-loc":"client/src/pages/BlogCategory.tsx:75",href:"/tin-tuc",children:e.jsxs("button",{"data-loc":"client/src/pages/BlogCategory.tsx:76",style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:13,fontWeight:600,color:"#7c3aed",background:"rgba(124,58,237,0.06)",border:"1px solid rgba(124,58,237,0.2)",borderRadius:8,padding:"6px 14px",cursor:"pointer"},children:[e.jsx(v,{"data-loc":"client/src/pages/BlogCategory.tsx:82",style:{width:14,height:14}}),"Tất cả bà i viết"]})})}),d?e.jsx("div",{"data-loc":"client/src/pages/BlogCategory.tsx:89",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:20},children:Array.from({length:6}).map((t,h)=>e.jsx(T,{"data-loc":"client/src/pages/BlogCategory.tsx:90"},h))}):s.length===0?e.jsxs("div",{"data-loc":"client/src/pages/BlogCategory.tsx:93",style:{textAlign:"center",padding:"60px 20px"},children:[e.jsx(r,{"data-loc":"client/src/pages/BlogCategory.tsx:94",style:{width:48,height:48,color:"#d1d5db",margin:"0 auto 16px"}}),e.jsx("p",{"data-loc":"client/src/pages/BlogCategory.tsx:95",style:{fontSize:16,fontWeight:600,color:"#374151",marginBottom:8},children:a?`Chưa có bà i viết nà o trong danh mục "${a.name}"`:"Danh mục không tá»n tại"}),e.jsx("p",{"data-loc":"client/src/pages/BlogCategory.tsx:98",style:{fontSize:13,color:"#9ca3af",marginBottom:20},children:"Hãy quay lại sau nhé!"}),e.jsx(l,{"data-loc":"client/src/pages/BlogCategory.tsx:99",href:"/tin-tuc",children:e.jsx("button",{"data-loc":"client/src/pages/BlogCategory.tsx:100",style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,fontWeight:700,color:"#fff",background:"linear-gradient(135deg, #7c3aed, #a855f7)",border:"none",borderRadius:10,padding:"10px 24px",cursor:"pointer"},children:"Xem tất cả bà i viết"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{"data-loc":"client/src/pages/BlogCategory.tsx:112",style:{fontSize:13,color:"#6b7280",marginBottom:20},children:[e.jsx("strong",{"data-loc":"client/src/pages/BlogCategory.tsx:113",style:{color:"#7c3aed"},children:s.length}
1)," bà i viết trong danh mục nà y"]}),e.jsx("div",{"data-loc":"client/src/pages/BlogCategory.tsx:115",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:20},children:s.map(t=>e.jsx(l,{"data-loc":"client/src/pages/BlogCategory.tsx:117",href:`/tin-tuc/${t.slug}`,children:e.jsxs("div",{"data-loc":"client/src/pages/BlogCategory.tsx:118",className:"card-hover-glow group",style:{borderRadius:14,overflow:"hidden",background:"#fff",border:"1px solid #e5e7eb",cursor:"pointer",height:"100%",display:"flex",flexDirection:"column",boxShadow:"0 1px 6px rgba(0,0,0,0.05)",transition:"box-shadow 0.2s ease, transform 0.2s ease"},children:[e.jsx("div",{"data-loc":"client/src/pages/BlogCategory.tsx:125",style:{aspectRatio:"16/9",overflow:"hidden",flexShrink:0},children:t.coverImage?e.jsx("img",{"data-loc":"client/src/pages/BlogCategory.tsx:127",src:t.coverImage,alt:t.coverImageAlt||t.title,loading:"lazy",decoding:"async",style:{width:"100%",height:"100%",objectFit:"cover",transition:"transform 0.4s ease"},className:"group-hover:scale-105"}):e.jsx(k,{"data-loc":"client/src/pages/BlogCategory.tsx:130"})}),e.jsxs("div",{"data-loc":"client/src/pages/BlogCategory.tsx:132",style:{padding:"16px 18px",display:"flex",flexDirection:"column",flex:1},children:[e.jsx("h2",{"data-loc":"client/src/pages/BlogCategory.tsx:133",style:{fontSize:15,fontWeight:700,color:"#111827",marginBottom:8,lineHeight:1.45,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t.title}),(t.excerpt||t.metaDescription)&&e.jsx("p",{"data-loc":"client/src/pages/BlogCategory.tsx:140",style:{fontSize:13,color:"#6b7280",lineHeight:1.6,marginBottom:12,flex:1,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t.excerpt||t.metaDescription}),e.jsxs("div",{"data-loc":"client/src/pages/BlogCategory.tsx:147",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"auto",paddingTop:10,borderTop:"1px solid #f3f4f6"},children:[e.jsxs("span",{"data-loc":"client/src/pages/BlogCategory.tsx:148",style:{display:"flex",alignItems:"center",gap:5,fontSize:12,color:"#9ca3af"},children:[e.jsx(w,{"data-loc":"client/src/pages/BlogCategory.tsx:149",style:{width:12,height:12}}),t.publishedAt?f(t.publishedAt):""]}),e.jsxs("span",{"data-loc":"client/src/pages/BlogCategory.tsx:152",style:{display:"flex",alignItems:"center",gap:4,fontSize:13,fontWeight:700,color:"#7c3aed"},className:"group-hover:gap-2",children:["Äá»c bà i ",e.jsx(u,{"data-loc":"client/src/pages/BlogCategory.tsx:153",style:{width:13,height:13}})]})]})]})]})},t.id))})]})]})})}export{$ 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.