1import{r as c}from"./rolldown-runtime.C1f3BsDW.js";import{r as m}from"./inertia.BE4YqsTM.js";import"./http.DWpeO7Ui.js";import{Hr as n,Qr as u,Xt as f}from"./icons.ChOq_Y4q.js";import{t as g}from"./react-core.CAMe6Z4j.js";import"./utils.CgzVjNgC.js";import"./state.L8kQliOB.js";import{i as j,k as a}from"./entry-client.DX3aUoe5.js";import"./dist.CoNAZqlp.js";import"./dist.DxccqHSW.js";import"./dist.D4237Rk6.js";import"./dist.BhzTvz6X.js";import"./es2015.Cr2X04_P.js";import"./dist.C1cc-Zbw.js";import"./badge.CK53iWwP.js";import"./dropdown-menu.D1MnQ7U0.js";import{t as b}from"./SEO.gPDL2mFy.js";import{t as N}from"./CtaMicrocopy.D3zGPrw8.js";import"./useRoute.D5WEuP_a.js";import"./useStartCreatingHref.BVwqKiRT.js";import"./gsap.BxN_RF7A.js";import"./RevealOnScroll.Bzi3Q9FE.js";import{t as w}from"./how-it-works-section.C3FA2lIt.js";import"./logo.7ZVhR9ER.js";import{t as y}from"./Footer.Ccp81B1O.js";import{t as v}from"./Header.C54sFzrK.js";import{n as S,r as _,t as A}from"./TemplateStarterGrid.CjoYNLMR.js";var o=c(u(),1),e=c(g(),1),k=()=>{const{templates:r,loading:d}=_(),[s,p]=(0,o.useState)("all"),x=j(t=>!!t.user),i=(0,o.useMemo)(()=>["all",...Array.from(new Set(r.map(t=>t.category)))],[r]),l=(0,o.useMemo)(()=>s==="all"?r:r.filter(t=>t.category===s),[r,s]),h=t=>{if(!x){m.visit(`/register?template=${t.slug}`);return}m.visit(`/dashboard/new?format=${t.slug}`)};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(b,{title:"Video Templates â Ads, Reels, Explainers & Films",description:"Start from a template: product ads, social reels, Product Hunt launches, explainers and short films. Answer a few questions and M Studio writes the script and boards every shot.",canonical:"/templates"}),(0,e.jsx)(v,{}),(0,e.jsx)("main",{className:"min-h-screen bg-background pt-24",children:(0,e.jsxs)("div",{className:"mx-auto max-w-6xl px-6 py-16",children:[(0,e.jsxs)("header",{className:"flex flex-col gap-3 text-center",children:[(0,e.jsx)("h1",{className:"font-display text-3xl font-semibold text-foreground sm:text-4xl",children:"Start from a template"}),(0,e.jsx)("p",{className:"mx-auto max-w-2xl text-muted-foreground",children:"Pick the kind of video you're making. Answer a few questions about your story â M Studio writes the script, casts the characters, and boards every shot."}),(0,e.jsx)(N,{className:"mt-1"})]}),i.length>2&&(0,e.jsx)("div",{role:"tablist","aria-label":"Filter templates by category",className:"mt-10 flex flex-wrap justify-center gap-2",children:i.map(t=>(0,e.jsx)(a,{type:"button",role:"tab","aria-selected":s===t,onClick:()=>p(t),variant:"outline",size:"sm",className:"font-normal text-muted-foreground hover:text-foreground aria-selected:border-border-strong aria-selected:bg-surface-active aria-selected:text-foreground",children:t==="all"?"All":A[t]??t},t))}),d?(0,e.jsx)("div",{className:"mt-16 flex justify-center",children:(0,e.jsx)(f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):l.length===0?(0,e.jsxs)("div",{className:"mt-16 flex flex-col items-center gap-4 text-center",children:[(0,e.jsx)("p",{className:"text-muted-foreground",children:"No templates available yet."}),(0,e.jsx)(a,{variant:"outline",asChild:!0,children:(0,e.jsxs)("a",{href:"/demo",children:["Watch examples",(0,e.jsx)(n,{className:"h-4 w-4","aria-hidden":"true"})]})})]}):(0,e.jsx)(S,{templates:l,onSelect:h,className:"mt-10"}),(0,e.jsxs)("div",{className:"mt-14 flex flex-col items-center gap-3 rounded-lg border border-border bg-card p-8 text-center shadow-raised",children:[(0,e.jsx)("h2",{className:"font-display text-xl font-semibold text-foreground",children:"Not sure which one?"}),(0,e.jsx)("p",{className:"max-w-lg text-sm text-muted-foreground",children:"See finished films made in M Studio, start to finish, then come back and pick the closest template."}),(0,e.jsx)(a,{variant:"outline",className:"mt-1",asChild:!0,children:(0,e.jsxs)("a",{href:"/demo",children:["Watch examples",(0,e.jsx)(n,{className:"h-4 w-4","aria-hidden":"true"})]})})]})]})}),(0,e.jsx)(w,{}),(0,e.jsx)(y,{})]})},te=k;export{te 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.