1import{p as L,a as j,j as e,L as r,i as l,N as T,e as A,A as E,E as B}from"./index-DU7EiW5Z.js";import{C as d}from"./card-vIo_cNEI.js";import{B as v}from"./badge-DAERl6XE.js";import{S as N}from"./skeleton-DnwL0UfC.js";import{H as x}from"./Header-dH_zm7gK.js";import{F as h}from"./Footer-CcSM9az0.js";import{u as I,S as b,b as k}from"./seo-DuDYZpV4.js";import{i as f}from"./toolVisibility-BuFB-MU6.js";import"./index-D7TqL6Li.js";import"./check-DnvdljkK.js";import"./index-ChbWPcUi.js";import"./Normal_(1)_1770767936075-DWlfSefL.js";import"./arrow-left-Duva7iIn.js";import"./video-CfxPEA4p.js";import"./index-CUko9iY5.js";import"./mail-kXcN9TSZ.js";function p(o){return o.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function G(){const{slug:o}=L(),{data:a,isLoading:c}=j({queryKey:["/api/tools/by-slug",o],enabled:!!o,queryFn:async()=>{const s=await fetch(`/api/tools/by-slug/${o}`);if(!s.ok)throw new Error("Tool not found");const t=await s.json();if(!f(t))throw new Error("Tool not found");return t}}),{data:n,isLoading:u}=j({queryKey:["/api/tools"]}),y=a?`Best ${a.name} Alternatives for Educators (2026) | AI Educator Tools`:"AI Tool Alternatives for Educators | AI Educator Tools",w=a?`Compare the best ${a.name} alternatives for educators, including pricing, ratings, classroom fit, and independent safety information.`:"Find and compare alternatives to popular AI tools for education.";if(I({title:y,description:w,canonicalPath:`/alternatives/${o||""}`,noindex:!c&&(!a||!n),enabled:!!(a&&n||!c&&!u),jsonLd:a?[k([{name:"Home",path:"/"},{name:"AI Tools",path:"/tools"},{name:`${a.name} alternatives`}]),{"@context":"https://schema.org","@type":"ItemList",name:`Best ${a.name} alternatives`,url:`${b}/alternatives/${o}`,itemListElement:(n||[]).filter(s=>s.id!==a.id&&f(s)).filter(s=>s.category===a.category||s.categories?.includes(a.category)).slice(0,10).map((s,t)=>({"@type":"ListItem",position:t+1,name:s.name,url:`${b}/${p(s.name)}`}))}]:void 0}),c||u)return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(x,{}),e.jsxs("main",{className:"container mx-auto max-w-5xl px-4 py-12 flex-1",children:[e.jsx(N,{className:"h-12 w-2/3 mb-6"}),e.jsx("div",{className:"space-y-4",children:[1,2,3,4,5].map(s=>e.jsx(N,{className:"h-32"},s))})]}),e.jsx(h,{})]});if(!a||!n)return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(x,{}),e.jsxs("main",{className:"container mx-auto max-w-3xl px-4 py-20 text-center flex-1",children:[e.jsx("h1",{className:"font-heading text-3xl font-bold mb-4",children:"Tool not found"}),e.jsx(r,{href:"/tools",children:e.jsx(l,{children:"Browse all AI tools"})})]}),e.jsx(h,{})]});const m=n.filter(s=>s.id!==a.id&&f(s)).filter(s=>s.category===a.category||s.categories?.includes(a.category)).sort((s,t)=>parseFloat(t.rating||"0")-parseFloat(s.rating||"0")).slice(0,10);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(x,{}),e.jsxs("main",{className:"container mx-auto max-w-5xl px-4 py-10 flex-1",children:[e.jsxs("nav",{className:"text-sm text-muted-foreground mb-4","aria-label":"Breadcrumb",children:[e.jsx(r,{href:"/",className:"hover:underline",children:"Home"}),e.jsx("span",{className:"mx-2",children:"/"}),e.jsx(r,{href:"/tools",className:"hover:underline",children:"Tools"}),e.jsx("span",{className:"mx-2",children:"/"}),e.jsxs("span",{children:[a.name," alternatives"]})]}),e.jsxs("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-3",children:["Best ",a.name," alternatives for educators"]}),e.jsxs("p",{className:"text-lg text-muted-foreground mb-8 max-w-3xl",children:["Looking for an alternative to ",a.name,"? These are the top ",m.length," AI tools in ",a.category.toLowerCase(),", ranked by verified educator reviews. Each has been vetted for safety compliance and classroom fit."]}),m.length===0?e.jsxs(d,{className:"p-8 text-center",children:[e.jsx("p",{className:"text-muted-foreground mb-4",children:"No alternatives available in this category yet."}),e.jsx(r,{href:"/tools",children:e.jsx(l,{children:"Browse all AI tools"})})]}):e.jsx("div",{className:"space-y-4 mb-10",children:m.map((s,t)=>{const i=p(s.name),g=parseFloat(s.rating||"0"),$=[p(a.name),i].sort().join("-vs-");return e.jsx(d,{className:"p-6","data-testid":`alt-card-${i}`,children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"text-4xl font-heading font-bold text-muted-foreground
1/50 flex-shrink-0",children:t+1}),s.logoUrl&&e.jsxs("span",{className:"relative flex-shrink-0",children:[e.jsx("img",{src:s.logoUrl,alt:`${s.name} logo`,className:"w-14 h-14 rounded-full object-cover bg-muted",loading:"lazy"}),e.jsx(T,{tool:s,size:22})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-1 flex-wrap",children:[e.jsx("h2",{className:"font-heading text-xl font-bold",children:e.jsx(r,{href:`/${i}`,className:"hover:underline",children:s.name})}),g>0&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-sm",children:[e.jsx(A,{className:"h-4 w-4 fill-yellow-500 text-yellow-500"}),e.jsx("span",{className:"font-semibold",children:g.toFixed(1)})]})]}),s.tagline&&e.jsx("p",{className:"text-muted-foreground mb-2",children:s.tagline}),s.shortDescription&&e.jsx("p",{className:"mb-3 text-sm",children:s.shortDescription}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[e.jsx(v,{variant:"secondary",children:s.category}),s.pricingType&&e.jsx(v,{variant:"outline",children:s.pricingType})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(r,{href:`/${i}`,children:e.jsx(l,{variant:"default",size:"sm",children:"Read review"})}),e.jsx(r,{href:`/compare/${$}`,children:e.jsxs(l,{variant:"outline",size:"sm",children:["Compare with ",a.name," ",e.jsx(E,{className:"ml-1 h-3 w-3"})]})}),s.website&&e.jsx("a",{href:s.website,target:"_blank",rel:"noopener nofollow",children:e.jsxs(l,{variant:"ghost",size:"sm",children:["Visit ",e.jsx(B,{className:"ml-1 h-3 w-3"})]})})]})]})]})},s.id)})}),e.jsxs(d,{className:"p-6 bg-muted/40",children:[e.jsx("h2",{className:"font-heading text-xl font-bold mb-3",children:"How we choose alternatives"}),e.jsxs("p",{className:"mb-3",children:["Every tool on this list has been vetted by our editorial team against the same criteria as ",a.name,": pedagogy, safety, data handling, and educator value. Rankings are ordered by average rating from verified educator reviews."]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Read our full ",e.jsx(r,{href:"/editorial",className:"underline",children:"editorial methodology"})," for how listings are selected and reviewed."]})]})]}),e.jsx(h,{})]})}export{G 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.