PageSourceSearch

https://www.trainning.com.br/assets/Formacoes-tpbR-rYQ.js

js trainning.com.br collected 2026-09-24 10:40:55 UTC 21,696 bytes, 12 lines download raw bytes

1import{r as i,c as T,j as e}from"./index-CpFQwZLR.js";import{iR as me,fQ as ue,bD as A,bV as ae,d as k,bU as xe,$ as re,_ as he,U as pe,iS as ge,B as V,L as g,gF as je,aK as te,a8 as fe,aa as Q,iT as be,iU as _e,iV as R,iW as X,dx as Ne,iX as $,aB as z,bK as ve,aC as ye,aD as we,bc as Ce,aF as Fe,aI as q,az as L,f as M,b as Pe,ap as Se,V as Te,R as ke,gf as Be,C as U,j as ce,n as oe,o as le,i as O,iY as ie,e as Ie,I as De,a1 as Y,a2 as Z,a3 as ee,a4 as se,a5 as F,iI as Re,iJ as Le,F as Ae,iZ as Ee,i_ as $e,w as qe,i$ as Me,cs as Ve,g as ze,iE as Ue,iF as Oe}from"./App-CIPEqH4m.js";import{P as He}from"./PageHeroWithForm-BaUEMGIC.js";import{S as We,V as Ke,B as Ge}from"./BlogSection-DvB9ImXc.js";import{C as Je}from"./CtaRow-Bb6Vn9VX.js";import{A as Qe,a as Xe,b as Ye,c as Ze}from"./accordion-Dtsnz6iv.js";import{C as es}from"./CouponInput-271alw5u.js";import{u as ss}from"./useInfiniteScroll-Df2kW9pv.js";import{t as as}from"./training-university-hero-Bcjd3RY3.js";import{S as rs}from"./Seo-Clyo2Rp1.js";import"./LeadCaptureFormPremium-BQt17UUn.js";import"./PostSubmitScheduling-CzJaohUK.js";import"./useCoupon-CkP3HdZz.js";const ts=({limit:r=5,categoryId:o})=>{const[n,_]=i.useState([]),[N,P]=i.useState(!0),[l,x]=i.useState(null),{trackConversion:y}=me();i.useEffect(()=>{h()},[o]);const h=async()=>{try{const a=ue();let t=T.from("cohorts").select(`
2          id,
3          course_id,
4          cohort_code,
5          start_date,
6          format,
7          schedule_time,
8          schedule_days,
9          available_spots,
10          max_students,
11          courses!inner(title, slug, category_id)
12        `).eq("is_visible",!0).gte("start_date",a).neq("status","encerradas").order("start_date",{ascending:!0});o&&(t=t.eq("courses.category_id",o));const{data:b,error:m}=await t.limit(r);if(m)throw m;const w=b?.map(c=>({id:c.id,course_id:c.course_id,cohort_code:c.cohort_code,course_title:c.courses.title,course_slug:c.courses.slug,start_date:c.start_date,format:c.format,schedule_time:c.schedule_time,schedule_days:c.schedule_days,available_spots:c.available_spots,max_students:c.max_students}))||[];_(w)}catch(a){console.error("Erro ao carregar datas:",a)}finally{P(!1)}};if(N)return e.jsx("div",{className:"space-y-3",children:[...Array(r)].map((a,t)=>e.jsx("div",{className:"h-16 bg-muted animate-pulse rounded-lg"},t))});if(n.length===0)return e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(A,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:"Nenhuma turma programada no momento"})]});const f=a=>{y("form_submit",void 0,void 0,{source:"proximas_turmas_cta",course_name:a.course_title,start_date:a.start_date,format:a.format}),x(a)};return e.jsxs(e.Fragment,{children:[e.jsx(Qe,{type:"single",collapsible:!0,className:"w-full upcoming-dates-accordion",children:e.jsxs(Xe,{value:"proximas-turmas",className:"border rounded-lg px-4 hover:border-primary/50 transition-colors",children:[e.jsx(Ye,{className:"hover:no-underline py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{className:"h-5 w-5 text-primary"}),e.jsxs("span",{className:"font-semibold",children:["Próximas Turmas (",n.length,")"]})]})}),e.jsx(Ze,{className:"pb-4 pt-2",children:e.jsx("div",{className:"space-y-3",children:n.map((a,t)=>e.jsxs("div",{className:"border rounded-lg p-3 hover:border-primary/50 transition-colors turma-card",children:[e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold text-sm",children:ae(a.start_date)}),e.jsx(k,{variant:"secondary",className:"text-xs",children:xe(a.format)})]})}),e.jsx("h4",{className:"font-medium text-sm mb-2",children:a.course_title}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs mb-3",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(re,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{children:a.schedule_time})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(he,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{children:a.schedule_days})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(pe,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{children:a.available_spots!==null?`${a.available_spots} vagas`:"Vagas abertas"})]})]}),a.available_spots!==null&&a.available_spots<=5&&a.available_spots>0&&e.jsx("div",{className:"mb-3",children:e.jsx(ge,{type:"limited_spots",value:a.available_spots,variant:"compact"})}),e.jsx(Je,{primary:e.jsx(je,{placement:"proximas_turmas",courseTitle:a.course_title,courseId:a.course_id,cohort:{id:a.id,cohort_code:a.cohort_code,start_date:a.start_date,schedule_days:a.schedule_days,schedule_time:a.schedule_time,format:a.format,available_spots:a.available_spots}}),secondary:e.jsx(V,{onClick:()=>f(a),size:"sm",variant:"outline",children:"Informações"}),tertiary:e.jsx(V,{asChild:!0,variant:"ghost",size:"sm",children:e.jsx(g,{to:`/curso/${a.course_slug}`,children:"Ver Detalhes"})})})]},t))})})]})}),l&&e.jsx(te,{formType:"pedir_informacoes",isOpen:!!l,onClose:()=>x(null),courseTitle:l.course_title,itemType:"curso",courseId:l.course_id,cohortInfo:{cohort_id:l.id,cohort_code:l.cohort_code??void 0,start_date:l.start_date,schedule_days:l.schedule_days,schedule_time:l.schedule_time,format:l.format}})]})};function cs({type:r,currentCategory:o,currentItem:n}){const _=fe(),{data:N=[]}=Q({queryKey:["public-nav-categories"],queryFn:async()=>{const{data:t}=await T.from("categories").select("id, name, slug").eq("approval_status","approved").order("is_mastertech",{ascending:!1}).order("display_order").limit(20);return t||[]},enabled:r==="cursos"}),{data:P=[]}=Q({queryKey:["public-nav-formations"],queryFn:async()=>{const{data:t}=await T.from("formations").select("id, name, slug").eq("is_active",!0).order("display_order").limit(15);return t||[]},enabled:r==="formacoes"}),l=r==="cursos"?N:P,x=r==="cursos"?"/cursos":"/formacoes",y=r==="cursos"?"Cursos":"Formações",h=r==="cursos"?z:ve,a=(o?l.find(t=>t.slug===o):null)?.name||"Todas Categorias";return e.jsx("div",{className:"bg-muted/30 border-b border-border h-10 flex items-center",children:e.jsx("div",{className:"max-w-7xl mx-auto px-3 sm:px-4 md:px-6 lg:px-8 w-full",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(be,{children:e.jsxs(_e,{className:"text-sm flex-nowrap",children:[e.jsx(R,{className:"shrink-0",children:e.jsx(X,{asChild:!0,children:e.jsx(g,{to:"/",className:"flex items-center text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(Ne,{className:"h-4 w-4"})})})}),e.jsx($,{className:"mx-1.5"}),e.jsx(R,{className:"shrink-0",children:e.jsx(X,{asChild:!0,children:e.jsxs(g,{to:x,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(h,{className:"h-3.5 w-3.5 hidden sm:block"}),e.jsx("span",{children:y})]})})}),e.jsx($,{className:"mx-1.5"}),e.jsx(R,{className:"shrink-0",children:e.jsxs(ye,{children:[e.jsxs(we,{className:"flex items-center gap-1 font-medium text-foreground hover:text-primary transition-colors cursor-pointer outline-none",children:[e.jsx("span",{className:"truncate max-w-[120px] sm:max-w-[200px]",children:a}),e.jsx(Ce,{className:"h-3.5 w-3.5 shrink-0"})]}),e.jsxs(Fe,{align:"start",className:"w-64 max-h-80 overflow-y-auto bg-background border border-border shadow-lg z-50",children:[e.jsx(q,{asChild:!0,children:e.jsxs(g,{to:x,className:L("w-full cursor-pointer flex items-center gap-2",!o&&"bg-primary/10 text-primary font-medium"),children:[e.jsx(h,{className:"h-4 w-4"}),"Todas Categorias"]})}),e.jsx(q,{asChild:!0,children:e.jsxs(g,{to:"/explorar",className:"w-full cursor-pointer flex items-center gap-2 text-primary",children:[e.jsx(M,{className:"h-4 w-4 shrink-0"}),"Explorar cursos e jornadas"]})}),e.jsx("div",{className:"h-px bg-border my-1"}),l.map(t=>e.jsx(q,{asChild:!0,children:e.jsx(g,{to:`${x}/${t.slug}`,className:L("w-full cursor-pointer",o===t.slug&&"bg-primary/10 text-primary font-medium"),children:t.name})},t.id))]})]})}),n&&e.jsxs(e.Fragment,{children:[e.jsx($,{className:"mx-1.5"}),e.jsx(R,{className:"shrink-0",children:e.jsx("span",{className:"font-medium text-foreground truncate max-w-[100px] sm:max-w-[180px] md:max-w-[250px]",children:n.title})})]})]})}),r==="cursos"&&e.jsxs("div",{className:"hidden md:flex items-center gap-1",children:[e.jsxs(g,{to:"/explorar",className:"flex items-center gap-1.5 px-2.5 py-1 rounded text-sm whitespace-nowrap text-primary hover:bg-primary/10",children:[e.jsx(M,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Jornadas"})]}),e.jsxs(g,{to:"/mastertech",className:L("flex items-center gap-1.5 px-2.5 py-1 rounded text-sm whitespace-nowrap transition-all",_.pathname==="/mastertech"?"bg-amber-500/15 text-amber-600 font-medium":"text-amber-600/80 hover:text-amber-600 hover:bg-amber-500/10"),children:[e.jsx(M,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"MasterTech"})]}),e.jsxs(g,{to:"/calendario",className:L("flex items-center gap-1.5 px-2.5 py-1 rounded text-sm whitespace-nowrap transition-all",_.pathname==="/calendario"?"bg-emerald-500/15 text-emerald-600 font-medium":"text-emerald-600/80 hover:text-emerald-600 hover:bg-emerald-500/10"),children:[e.jsx(A,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Calendário"})]})]})]})})})}const _s=()=>{const[r,o]=i.useState([]),[n,_]=i.useState(!0),[N,P]=i.useState(null),[l,x]=i.useState(!1),[y,h]=i.useState([]),[f,a]=i.useState("all"),[t,b]=i.useState(""),[m,w]=i.useState("all"),[c]=i.useState([{display_text:"SAP Completo",search_term:"SAP"},{display_text:"Power BI Pro",search_term:"Power BI"},{display_text:"Cyber Security",search_term:"Security"},{display_text:"Data Science",search_term:"Data"}
12]),[v,B]=i.useState(1),S=9,H=i.useCallback(async()=>{try{const s=await T.from("categories").select("id, name, slug").eq("is_active",!0).order("name");if(s.error)throw s.error;h(s.data||[])}catch(s){console.error("Erro ao carregar categorias:",s),h([])}},[]),W=i.useCallback(async()=>{try{const s=await T.from("formations").select("*, formation_courses(course_id, courses(id, title, price_cash, duration_hours, format))").eq("is_active",!0).order("display_order",{ascending:!0});if(s.error)throw s.error;const d=await Promise.all((s.data||[]).map(async j=>{const p=j.formation_courses?.map(C=>C.courses?.id).filter(Boolean)||[];if(p.length>0){const C=await T.from("cohorts").select("id, course_id, start_date, end_date, schedule_days, schedule_time, format, available_spots, max_students").in("course_id",p).order("start_date",{ascending:!0});j.formation_courses=j.formation_courses.map(u=>({...u,courses:{...u.courses,cohorts:C.data?.filter(I=>I.course_id===u.courses?.id)||[]}}))}return j}));o(d)}catch(s){console.error("Erro ao carregar formações:",s)}finally{_(!1)}},[]);i.useEffect(()=>{H(),W()},[H,W]);const K=s=>{const d=s.formation_courses||[],j=d.reduce((I,E)=>I+(E.courses?.duration_hours||0),0),p=d.reduce((I,E)=>I+(E.courses?.price_cash||0),0),C=Number(s.price_cash)||0,u=C>0?C:p*(1-(s.discount_percentage||0)/100);return{totalHours:j,totalPrice:p,discountedPrice:u,courseCount:d.length}},G=r.filter(s=>{const d=s.name.toLowerCase().includes(t.toLowerCase())||s.short_description?.toLowerCase().includes(t.toLowerCase()),j=f==="all"||s.category_id===f;let p=!0;if(m!=="all"){const u=K(s).discountedPrice;m==="under-2000"?p=u<2e3:m==="2000-5000"?p=u>=2e3&&u<5e3:m==="5000-10000"?p=u>=5e3&&u<1e4:m==="over-10000"&&(p=u>=1e4)}return d&&j&&p}),J=G.slice(0,v*S),D=G.length>v*S,ne=i.useCallback(()=>{!n&&D&&B(s=>s+1)},[n,D]),de=ss({loading:n,hasMore:D,onLoadMore:ne});return n?e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}):e.jsxs(Pe,{showSearch:!0,children:[e.jsx(rs,{title:"Formações em Tecnologia | Trainning Education",description:"Conheça as formações completas em tecnologia da Trainning Education: cursos integrados, certificação reconhecida e desconto progressivo em pacotes.",canonicalPath:"/formacoes"}),e.jsx(He,{title:"Formações Completas em Tecnologia",subtitle:"Programas de capacitação profissional com cursos integrados, certificação reconhecida e descontos especiais",backgroundImage:as,liveViewersId:"formacoes-page",liveViewersMin:10,liveViewersMax:32,benefits:[{icon:Se,text:"Formação completa e integrada"},{icon:Te,text:"Desconto progressivo em pacotes"},{icon:re,text:"Aprenda no seu ritmo"},{icon:ke,text:"Certificado reconhecido"}],formTitle:"Solicite Informações",courseTitle:"Formações",compact:!0}),e.jsx(cs,{type:"formacoes"}),e.jsx(Be,{location:"formations"}),e.jsx("section",{className:"py-6 sm:py-8 md:py-10 border-b border-border lg:py-[20px]",children:e.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsx("h2",{className:"text-xl sm:text-2xl md:text-3xl font-bold mb-4 sm:mb-5 md:mb-6",children:"Próximas Turmas"}),e.jsx(ts,{limit:5})]})}),e.jsx("section",{className:"py-6 sm:py-8 border-b border-border",children:e.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsx("h2",{className:"text-xl sm:text-2xl md:text-3xl font-bold mb-4 sm:mb-5 md:mb-6",children:"Formações em Destaque"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.filter(s=>s.is_featured).slice(0,3).map(s=>{const{discountedPrice:d,courseCount:j}=K(s);return e.jsx(g,{to:`/formacoes/${s.slug}`,children:e.jsxs(U,{className:"h-full hover:shadow-xl transition-all hover:scale-[1.02]",children:[s.thumbnail_url&&e.jsxs("div",{className:"relative aspect-[16/9] overflow-hidden rounded-t-lg",children:[e.jsx("img",{src:s.thumbnail_url,alt:s.name,className:"w-full h-full object-cover"}),s.discount_percentage>0&&e.jsxs(k,{className:"absolute top-3 right-3 bg-green-600 text-white",children:[s.discount_percentage,"% OFF"]})]}),e.jsxs(ce,{children:[e.jsx(oe,{className:"text-lg",children:s.name}),e.jsx(le,{className:"line-clamp-2",children:s.short_description})]}),e.jsxs(O,{children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-2",children:[e.jsx(z,{className:"w-4 h-4"}),e.jsxs("span",{children:[j," cursos incluídos"]})]}),e.jsx(ie,{priceCash:d,priceInstallmentsTotal:Number(s.price_cash)>0?s.price_installments:void 0,variant:"compact"})]})]})},s.id)})})]})}),e.jsx("section",{className:"py-4 sm:py-6 md:py-8 bg-muted/30 border-b border-border",children:e.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Ie,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 sm:w-5 sm:h-5 text-muted-foreground pointer-events-none"}),e.jsx(De,{placeholder:"Buscar formações...",value:t,onChange:s=>b(s.target.value),className:"pl-10 sm:pl-12 h-11 sm:h-12 text-sm sm:text-base"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[e.jsxs(Y,{value:f,onValueChange:a,children:[e.jsx(Z,{className:"w-full h-11 sm:h-12 text-sm sm:text-base",children:e.jsx(ee,{placeholder:"Categoria"})}),e.jsxs(se,{className:"z-50",children:[e.jsx(F,{value:"all",children:"Todas as categorias"}),y.map(s=>e.jsx(F,{value:s.id,children:s.name},s.id))]})]}),e.jsxs(Y,{value:m,onValueChange:w,children:[e.jsx(Z,{className:"w-full h-11 sm:h-12 text-sm sm:text-base",children:e.jsx(ee,{placeholder:"Faixa de preço"})}),e.jsxs(se,{className:"z-50",children:[e.jsx(F,{value:"all",children:"Todos os preços"}),e.jsx(F,{value:"under-2000",children:"Até R$ 2.000"}),e.jsx(F,{value:"2000-5000",children:"R$ 2.000 - R$ 5.000"}),e.jsx(F,{value:"5000-10000",children:"R$ 5.000 - R$ 10.000"}
12),e.jsx(F,{value:"over-10000",children:"Acima de R$ 10.000"})]})]})]})]})})}),c.length>0&&e.jsx("section",{className:"py-4 sm:py-5 md:py-6 bg-muted/20 border-b border-border",children:e.jsx("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[e.jsx("span",{className:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Palavras-chave:"}),c.map((s,d)=>e.jsx(k,{variant:"secondary",className:"cursor-pointer hover:bg-accent text-xs sm:text-sm h-7 sm:h-8 px-2 sm:px-3 touch-manipulation",onClick:()=>b(s.search_term),children:s.display_text},d))]})})}),e.jsx("section",{id:"formacoes",className:"py-8 sm:py-10 md:py-12 lg:py-16",children:e.jsxs("div",{className:"container px-4 sm:px-6 lg:px-8",children:[n?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6}).map((s,d)=>e.jsx(U,{className:"h-full",children:e.jsx(O,{className:"p-4",children:e.jsxs("div",{className:"animate-pulse space-y-3",children:[e.jsx("div",{className:"h-40 bg-muted rounded"}),e.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),e.jsx("div",{className:"h-3 bg-muted rounded w-1/2"})]})})},d))}):e.jsx(e.Fragment,{children:J.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(z,{className:"w-16 h-16 mx-auto text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"Nenhuma formação encontrada com os filtros aplicados."})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6",children:J.map(s=>e.jsx(os,{formation:s},s.id))})}),D&&e.jsx("div",{ref:de,className:"h-10"})]})}),e.jsx("section",{className:"py-8 sm:py-10 md:py-12 bg-muted/30 border-t border-border",children:e.jsx("div",{className:"container px-4 sm:px-6 lg:px-8",children:e.jsx(es,{orderTotal:1e3})})}),e.jsx(Re,{variant:"dark"}),e.jsx(We,{}),e.jsx(Ke,{}),e.jsx(Ge,{}),e.jsx(Le,{pageSlug:"formacoes"}),e.jsx(Ae,{}),N&&e.jsx(te,{isOpen:l,onClose:()=>x(!1),formType:"fazer_inscricao",itemType:"formacao",courseTitle:N.name})]})},os=({formation:r})=>{const{blackFridayData:o}=Ee(void 0,r.id),n=t=>{const b=t.formation_courses||[],m=b.reduce((B,S)=>B+(S.courses?.duration_hours||0),0),w=b.reduce((B,S)=>B+(S.courses?.price_cash||0),0),c=Number(t.price_cash)||0,v=c>0?c:w*(1-(t.discount_percentage||0)/100);return{totalHours:m,totalPrice:w,discountedPrice:v,courseCount:b.length}},_=t=>(t.formation_courses||[]).flatMap(c=>(c.courses?.cohorts||[]).map(v=>({...v,courseTitle:c.courses?.title}))).filter(c=>Ue(c.start_date)).sort((c,v)=>Oe(c.start_date,v.start_date)).slice(0,3),{totalPrice:N,discountedPrice:P,courseCount:l}=n(r),x=_(r),y=r.formation_courses||[],h=o?.isBlackFriday?o.discountedPrice:P,f=o?.isBlackFriday||r.discount_percentage>0,a=o?.isBlackFriday?o.originalPrice:N;return e.jsx(g,{to:`/formacoes/${r.slug}`,className:"block h-full",children:e.jsxs(U,{className:"flex flex-col h-full hover:shadow-xl transition-all hover:scale-[1.02]",children:[r.thumbnail_url&&e.jsxs("div",{className:"relative aspect-[16/9] overflow-hidden rounded-t-lg",children:[e.jsx("img",{src:r.thumbnail_url,alt:r.name,className:"w-full h-full object-cover",loading:"lazy"}),o?.isBlackFriday&&e.jsx("div",{className:"absolute top-3 left-3",children:e.jsx($e,{text:o.badgeText,color:o.badgeColor,pulse:!0})}),!o?.isBlackFriday&&r.discount_percentage>0&&e.jsx("div",{className:"absolute top-3 right-3",children:e.jsxs(k,{className:"bg-green-600 text-white text-sm px-3 py-1",children:[r.discount_percentage,"% OFF"]})}),o?.isBlackFriday&&o.discountPercentage>0&&e.jsx("div",{className:"absolute top-3 right-3",children:e.jsxs(k,{className:"bg-yellow-500 text-black font-bold text-sm px-3 py-1 shadow-lg",children:[o.discountPercentage,"% OFF"]})})]}),e.jsxs(ce,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsx(oe,{className:"text-lg leading-tight",children:r.name}),r.is_featured&&e.jsx(k,{variant:"default",className:"text-xs",children:"Destaque"})]}),r.short_description&&e.jsx(le,{className:"line-clamp-2 text-sm",children:r.short_description})]}),e.jsxs(O,{className:"flex-1 pt-0",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("p",{className:"text-xs font-semibold text-muted-foreground mb-2",children:[l," curso",l!==1?"s":""," incluso",l!==1?"s":""]}),e.jsxs("div",{className:"space-y-1",children:[y.slice(0,3).map(t=>e.jsxs("div",{className:"flex items-start gap-1.5 text-xs text-muted-foreground",children:[e.jsx(qe,{className:"w-3 h-3 mt-0.5 flex-shrink-0 text-primary"}),e.jsx("span",{className:"line-clamp-1",children:t.courses?.title})]},t.course_id)),l>3&&e.jsxs("p",{className:"text-xs text-primary font-medium pl-4",children:["+",l-3," curso",l-3>1?"s":""]})]})]}),x.length>0&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-4 p-2 bg-muted/50 rounded",children:[e.jsx(A,{className:"w-3.5 h-3.5 text-primary flex-shrink-0"}),e.jsxs("span",{children:["Próxima: ",e.jsx("span",{className:"font-medium text-foreground",children:ae(x[0].start_date)})]})]}),e.jsxs("div",{className:"border-t pt-4 mt-auto",children:[f&&e.jsxs("p",{className:"text-sm text-muted-foreground line-through mb-1",children:["R$ ",a.toFixed(2)]}),e.jsx(ie,{priceCash:h,installmentsCount:12,priceInstallmentsTotal:Number(r.price_cash)>0&&Number(h)===Number(r.price_cash)?r.price_installments:void 0,variant:"compact"}),f&&e.jsxs("p",{className:"text-xs text-green-600 font-semibold mt-1",children:["Economize R$ ",(a-h).toFixed(2)]}),e.jsx(Me,{variant:"compact",className:"mt-2"})]})]}),e.jsx(Ve,{className:"pt-0",children:e.jsxs(V,{className:"w-full",variant:"default",children:["Ver Detalhes",e.jsx(ze,{className:"w-4 h-4 ml-2"})]})})]})})};export{_s 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.