1import{u as A,a as k,j as e,c as u,H as h,S as c,L as g,A as f,d as E,k as L}from"./index-BwUR6b56.js";import{u as q,a as F}from"./useImageEnhancement-C98NCUMP.js";const B=()=>{const{tag:t}=A(),r=!k().pathname.startsWith("/fr")?"en":"fr",{news:l,loading:j,error:N}=q(t||"",50),{enhanceImage:b,getEnhancedImageUrl:w,isEnhancing:y}=F({enableEnhancement:!0,enhancementType:"professional"}),d=(t==null?void 0:t.toLowerCase())==="all",v=s=>new Date(s*1e3).toLocaleDateString(r==="fr"?"fr-FR":"en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),x=(s,n)=>s.length<=n?s:s.substring(0,n).trim()+"...",T=s=>new DOMParser().parseFromString(s,"text/html").body.textContent||"",C=(s,n)=>{const o=T(s);return x(o,n)};return j?e.jsxs(e.Fragment,{children:[e.jsx(u,{title:`${r==="fr"?"Chargement...":"Loading..."} | The Coin Course`,description:r==="fr"?"Chargement des articles...":"Loading articles...",language:r}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(h,{}),e.jsx("main",{className:"container mx-auto px-4 py-8",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsx(c,{className:"h-8 w-32 mb-6"}),e.jsx(c,{className:"h-10 w-1/2 mb-8"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:[...Array(12)].map((s,n)=>e.jsxs("div",{className:"bg-card border rounded-lg overflow-hidden",children:[e.jsx(c,{className:"aspect-square w-full bg-muted"}),e.jsxs("div",{className:"p-3",children:[e.jsx(c,{className:"h-3 w-3/4 mb-2"}),e.jsx(c,{className:"h-2 w-full mb-1"}),e.jsx(c,{className:"h-2 w-2/3 mb-2"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(c,{className:"h-2 w-12"}),e.jsx(c,{className:"h-2 w-16"})]})]})]},n))})]})})]})]}):N||!t?e.jsxs(e.Fragment,{children:[e.jsx(u,{title:"Tag Not Found | The Coin Course",description:"The tag you're looking for could not be found. Browse our complete collection of cryptocurrency articles, guides, and tutorials on The Coin Course.",noIndex:!0}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(h,{}),e.jsx("main",{className:"container mx-auto px-4 py-8",children:e.jsxs("div",{className:"max-w-6xl mx-auto text-center",children:[e.jsxs(g,{to:r==="fr"?"/fr":"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-8",children:[e.jsx(f,{className:"h-4 w-4"}),r==="fr"?"Retour à l'accueil":"Back to Home"]}),e.jsx("h1",{className:"text-2xl font-bold mb-4",children:r==="fr"?"Tag introuvable":"Tag Not Found"}),e.jsx("p",{className:"text-muted-foreground",children:r==="fr"?"Aucun article trouvé pour ce tag.":"No articles found for this tag."})]})})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(u,{title:d?`${r==="fr"?"Tous les articles":"All Articles"} | The Coin Course`:`${t} Articles | The Coin Course`,description:d?"Explore our complete collection of cryptocurrency articles, tutorials, and expert analysis covering Bitcoin, Ethereum, DeFi, NFTs, and blockchain technology on The Coin Course.":`Explore comprehensive articles and guides about ${t} on The Coin Course. Stay informed with expert analysis, tutorials, and the latest developments in ${t} cryptocurrency topics.`,language:r,keywords:d?[]:[t],canonicalUrl:`https://thecoincourse.com${r==="en"?"":"/fr"}/tag/${(t||"").toLowerCase().replace(/['".]/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}`,structuredDataType:"collectionpage",articleData:{category:t||"All Articles"},noIndex:!0}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(h,{}),e.jsx("main",{className:"container mx-auto px-4 py-8",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs(g,{to:r==="fr"?"/fr":"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-8 transition-colors",children:[e.jsx(f,{className:"h-4 w-4"}),r==="fr"?"Retour à l'accueil":"Back to Home"]}),e.jsxs("div",{className:"mb-8",children:[!d&&e.jsx("div",{className:"flex items-center gap-3 mb-4",children:e.jsx(E,{variant:"secondary",className:"text-sm px-3 py-1",children:t})}),e.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-2",children:d?r==="fr"?"Tous les articles":"All articles":`${r==="fr"?"Articles sur":"Articles about"} ${t}`}),e.jsx("p",{className:"text-muted-foreground",children:r==="fr"?`${l.length} article${l.length>
11?"s":""} trouvé${l.length>1?"s":""}`:`${l.length} article${l.length>1?"s":""} found`})]}),l.length>0?e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:l.map(s=>{const n=r==="fr"?`/fr/news/${s.slug||s.id}`:`/news/${s.slug||s.id}`;return e.jsxs(g,{to:n,state:{article:s},className:"bg-card border rounded-lg overflow-hidden hover:shadow-lg transition-all duration-300 hover-scale group flex flex-col",children:[s.imageurl&&e.jsx("div",{className:"aspect-square overflow-hidden bg-muted",children:e.jsx("img",{src:w(s.imageurl),alt:s.title,className:`w-full h-full object-cover group-hover:scale-105 transition-transform duration-300 ${y(s.imageurl)?"opacity-75":""}`,loading:"lazy",onError:o=>{o.currentTarget.src="https://images.unsplash.com/photo-1621761191319-c6fb62004040?w=300&h=300&fit=crop&crop=center&q=80",o.currentTarget.style.display="block",o.currentTarget.onerror=null},onLoad:async o=>{const p=await b(s.imageurl,s.title);p!==s.imageurl&&(o.currentTarget.src=p);const m=o.currentTarget;if(m.naturalWidth<200||m.naturalHeight<200){const $=["https://images.unsplash.com/photo-1621761191319-c6fb62004040?w=300&h=300&fit=crop&crop=center&q=80","https://images.unsplash.com/photo-1639762681485-074b7f938ba0?w=300&h=300&fit=crop&crop=center&q=80","https://images.unsplash.com/photo-1518770660439-4636190af475?w=300&h=300&fit=crop&crop=center&q=80","https://images.unsplash.com/photo-1640340434855-6084b1f4901c?w=300&h=300&fit=crop&crop=center&q=80","https://images.unsplash.com/photo-1642104704074-907c0698cbd9?w=300&h=300&fit=crop&crop=center&q=80","https://images.unsplash.com/photo-1610296669228-602fa827880a?w=300&h=300&fit=crop&crop=center&q=80"],a=s.title.toLowerCase();let i=0;a.includes("bitcoin")||a.includes("btc")?i=0:a.includes("trading")||a.includes("price")||a.includes("rally")?i=1:a.includes("blockchain")||a.includes("technology")?i=2:a.includes("market")||a.includes("analysis")||a.includes("chart")?i=3:a.includes("ethereum")||a.includes("altcoin")||a.includes("crypto")?i=4:i=5,m.src=$[i]}}})}),e.jsxs("div",{className:"p-3 flex flex-col flex-1",children:[e.jsx("h3",{className:"font-medium text-sm mb-2 line-clamp-2 group-hover:text-primary transition-colors",children:x(s.title,60)}),e.jsx("p",{className:"text-xs text-muted-foreground mb-2 line-clamp-2 flex-grow",children:C(s.body,80)}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground mt-auto",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(L,{className:"h-3 w-3"}),e.jsx("span",{className:"text-xs",children:v(s.published_on)})]}),e.jsxs("div",{className:"flex items-center gap-1 min-w-0",children:[e.jsx("img",{src:s.source_info.img,alt:s.source_info.name,className:"h-3 w-3 rounded-full flex-shrink-0",onError:o=>{o.currentTarget.style.display="none"}}),e.jsx("span",{className:"truncate text-xs",children:s.source_info.name})]})]})]})]},s.guid)})}):e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:r==="fr"?"Aucun article trouvé pour ce tag.":"No articles found for this tag."})})]})})]})]})};export{B 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.