1import{r as s,j as e}from"./index-zDT7qorx.js";import{u as v}from"./useServerFn-iEHnDrl5.js";import{a as b}from"./tools-ai.functions-D-RJ4TL-.js";import{T as N,F as n,i as o,S as B,R as E}from"./tools-ui-BQxEqXof.js";function L(){const m=v(b),[r,h]=s.useState(""),[l,p]=s.useState("60 seconds"),[i,x]=s.useState("Energetic, founder voice"),[c,u]=s.useState(!1),[f,d]=s.useState(null),[j,g]=s.useState(null);async function S(t){t.preventDefault(),u(!0),d(null),g(null);try{const a=await m({data:{blog:r,duration:l,tone:i}});g(a.content)}catch(a){d(a instanceof Error?a.message:"Something went wrong")}finally{u(!1)}}return e.jsxs(N,{tag:"AI",title:"Blog to Video Script",description:"Paste your blog post and get a punchy short-form video script with hook, visual cues and CTA.",children:[e.jsxs("form",{onSubmit:S,className:"flex flex-col gap-4",children:[e.jsx(n,{label:"Blog post",children:e.jsx("textarea",{required:!0,rows:10,minLength:50,maxLength:15e3,value:r,onChange:t=>h(t.target.value),placeholder:"Paste the full blog text hereâ¦",className:`${o} resize-none`})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsx(n,{label:"Duration",children:e.jsxs("select",{value:l,onChange:t=>p(t.target.value),className:`${o} appearance-none`,children:[e.jsx("option",{className:"bg-neutral-900",children:"30 seconds"}),e.jsx("option",{className:"bg-neutral-900",children:"60 seconds"}),e.jsx("option",{className:"bg-neutral-900",children:"90 seconds"}),e.jsx("option",{className:"bg-neutral-900",children:"2â3 minutes"})]})}),e.jsx(n,{label:"Tone",children:e.jsx("input",{value:i,maxLength:100,onChange:t=>x(t.target.value),className:o,placeholder:"e.g. Energetic, calm, authoritative"})})]}),e.jsx(B,{loading:c,children:"Generate script"})]}),e.jsx(E,{loading:c,error:f,result:j})]})}export{L as component};
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.