import{l as p}from"./app-BR4co3z8.js";import{_ as f}from"./MemberAreaAppLayout-BxW5ZzTy.js";import{C as t,l as s,n as e,H as n,I as d,t as l,z as m,B as _,u as k,x as u,D as x}from"./Button-C102TjBP.js";import"./PwaInstallPrompt-8KzxD8Wq.js";import"./usePwaInstall-shptWyD0.js";import"./smartphone-CkQmwfEJ.js";import"./x-BbEgqhmY.js";import"./check-B1gbRPfI.js";import"./external-link-CqmoFOt1.js";import"./menu-CGNh-s2C.js";import"./trophy-CrlpL_J7.js";import"./circle-check-big-CF0PZCmO.js";import"./chevron-down-CoIH4uPt.js";import"./user-Cb0gaC1k.js";import"./lock-Dw-lWg4m.js";import"./circle-alert-CuTXqZ5k.js";const h={class:"space-y-8"},y={class:"space-y-8"},g={class:"text-xl font-semibold text-zinc-300"},v={class:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3"},b={key:1,class:"block opacity-70"},z={class:"p-4"},w={class:"font-medium"},j={key:0,class:"mt-1 text-xs text-zinc-400"},B={class:"mt-2 space-y-1"},M={class:"flex min-w-0 items-center gap-2 truncate"},$={key:0,class:"text-emerald-400"},C={key:2,class:"truncate text-zinc-500"},V={key:0,class:"shrink-0 text-[10px] text-zinc-500"},R=Object.assign({layout:f},{__name:"Modulos",props:{product:{type:Object,required:!0},config:{type:Object,default:()=>({})},sections:{type:Array,default:()=>[]},slug:{type:String,required:!0}},setup(a){return(A,r)=>(t(),s("div",h,[r[2]||(r[2]=e("h1",{class:"text-2xl font-bold"},"Módulos",-1)),e("div",y,[(t(!0),s(n,null,d(a.sections,c=>(t(),s("section",{key:c.id,class:"space-y-4"},[e("h2",g,l(c.title),1),e("div",v,[(t(!0),s(n,null,d(c.modules,i=>(t(),s("div",{key:i.id,class:"rounded-xl border border-zinc-700 bg-zinc-800/50 overflow-hidden"},[i.is_locked?(t(),s("div",b,[...r[1]||(r[1]=[e("div",{class:"aspect-video w-full bg-zinc-700 flex items-center justify-center relative"},[e("svg",{class:"h-12 w-12 text-zinc-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})]),e("div",{class:"absolute inset-0 bg-black/40"})],-1)])])):(t(),m(k(p),{key:0,href:`/m/${a.slug}/modulo/${i.id}`,class:"block"},{default:_(()=>[...r[0]||(r[0]=[e("div",{class:"aspect-video w-full bg-zinc-700 flex items-center justify-center"},[e("svg",{class:"h-12 w-12 text-zinc-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})])],-1)])]),_:1},8,["href"])),e("div",z,[e("p",w,l(i.title),1),i.is_locked&&i.lock_message?(t(),s("p",j,l(i.lock_message),1)):u("",!0),e("ul",B,[(t(!0),s(n,null,d(i.lessons,o=>(t(),s("li",{key:o.id,class:"flex items-center justify-between gap-2 text-sm"},[e("span",M,[o.is_completed?(t(),s("span",$,"✓")):u("",!0),!i.is_locked&&!o.is_locked?(t(),m(k(p),{key:1,href:`/m/${a.slug}/modulo/${i.id}?aula=${o.id}`,class:"hover:text-[var(--ma-primary)] truncate"},{default:_(()=>[x(l(o.title),1)]),_:2},1032,["href"])):(t(),s("span",C,l(o.title),1))]),!i.is_locked&&o.is_locked&&o.lock_message?(t(),s("span",V,l(o.lock_message),1)):u("",!0)]))),128))])])]))),128))])]))),128))])]))}});export{R as default};
