1import{j as e,H as F,C as i,a as u,b as g,y as j,c as O,d as r,I as D,B as c,e as f,z as A,t as R,u as y}from"./index-Bv3rsuc4.js";import{r as t}from"./vendor-CTEsYQXU.js";import{L as b}from"./label-Da_llQ_D.js";import{T as H}from"./textarea-Dxqhndvp.js";import{S as V,a as K,b as Y,c as $,d as w}from"./select-Cn0CxzMW.js";import{A as q}from"./accordion-BCEyUoO6.js";import{T as U}from"./ToolPageSections-CxrRc6HV.js";import{P as _}from"./ProcessingOverlay-qX6nzn-0.js";import{C}from"./copy-BziJLxwl.js";import"./index-BdQq_4o_.js";import"./check-Bpk8qOtD.js";const a=R["caption-generator"],J={professional:{captions:["Elevating standards in {topic}. Excellence isn't optional â it's the foundation. ð¼","In the world of {topic}, consistency breeds success. Here's what we've learned along the way. ð","Mastering {topic} requires dedication, strategy, and the courage to innovate. Let's grow together. ð"],hashtags:["#{topic}","#Professional","#Growth","#Success","#Innovation","#Business","#Mindset","#Leadership","#Motivation","#Goals"]},funny:{captions:["If {topic} was easy, everyone would be doing it. Oh wait, everyone IS doing it ð","Me pretending I know everything about {topic} while Googling furiously ð¤£","Plot twist: {topic} is actually just controlled chaos with a filter on it ð "],hashtags:["#{topic}","#Funny","#Relatable","#Memes","#LOL","#Humor","#Comedy","#Viral","#TooReal","#Mood"]},motivational:{captions:["Every expert in {topic} was once a beginner. Your journey starts with a single step. ð¥","Don't wait for the perfect moment in {topic}. Take the moment and make it perfect. â¨","Success in {topic} doesn't come from what you do occasionally. It comes from what you do consistently. ðª"],hashtags:["#{topic}","#Motivation","#Hustle","#DreamBig","#NeverGiveUp","#Inspire","#Grind","#BelieveInYourself","#Success","#Mindset"]}},re=()=>{const[n,I]=t.useState(""),[v,M]=t.useState("professional"),[o,P]=t.useState(""),[l,k]=t.useState(""),[m,N]=t.useState(!1),[E,d]=t.useState(!1),[h,S]=t.useState(null),T=()=>{if(!n.trim()){y.error("Please enter a topic or keyword");return}N(!0),d(!1),setTimeout(()=>{const s=J[v],x=s.captions[Math.floor(Math.random()*s.captions.length)],G=n.trim().replace(/\s+/g,""),L=x.replace(/\{topic\}/g,n.trim()),z=s.hashtags.map(B=>B.replace(/\{topic\}/g,G)).join(" ");P(L),k(z),N(!1),d(!0),setTimeout(()=>d(!1),1500),y.success("Caption & hashtags generated!")},800)},p=(s,x)=>{navigator.clipboard.writeText(s),S(x),setTimeout(()=>S(null),1500),y.success("Copied to clipboard!")};return e.jsxs(e.Fragment,{children:[e.jsxs(F,{children:[e.jsx("title",{children:a.title}),e.jsx("meta",{name:"description",content:a.metaDescription})]}),e.jsx(_,{isProcessing:m,message:"Generating caption...",isComplete:E}),e.jsxs("div",{className:"max-w-3xl mx-auto space-y-6 animate-in",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold mb-2",children:a.name}),e.jsx("p",{className:"text-muted-foreground",children:a.shortDescription})]}),e.jsx(q,{slot:"header"}),e.jsxs(i,{children:[e.jsxs(u,{children:[e.jsxs(g,{className:"flex items-center gap-2",children:[e.jsx(j,{className:"h-5 w-5 text-primary"}),"Generate Caption"]}),e.jsx(O,{children:"Enter a topic and choose a tone"})]}),e.jsxs(r,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{children:"Topic / Keyword"}),e.jsx(D,{placeholder:"e.g. fitness, photography, startup",value:n,onChange:s=>I(s.target.value),onKeyPress:s=>s.key==="Enter"&&T()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{children:"Tone"}),e.jsxs(V,{value:v,onValueChange:M,children:[e.jsx(K,{children:e.jsx(Y,{})}),e.jsxs($,{children:[e.jsx(w,{value:"professional",children:"Professional ð¼"}),e.jsx(w,{value:"funny",children:"Funny ð"}),e.jsx(w,{value:"motivational",children:"Motivational ð¥"})]})]})]}),e.jsxs(c,{onClick:T,className:"w-full",size:"lg",disabled:m,children:[e.jsx(j,{className:"h-4 w-4 mr-2"}),"Generate Caption & Hashtags"]})]})]}),o&&!m&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{className:"animate-fade-in",children:[e.jsx(u,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(g,{className:"flex items-center gap-2",children:[e.jsx(j,{className:"h-5 w-5 text-primary"}),"Caption"]}),e.jsx(c,{variant:"ghost",size:"sm",onClick:()=>p(o,"caption"),children:h==="caption"?e.jsx(f,{className:"h-4 w-4 text-primary"}):e.jsx(C,{className:"h-4 w-4"})})]})}),e.jsx(r,{children:e.jsx(H,{value:o,readOnly:!0,className:"min-h-[100px] resize-none text-base"})})]}),e.jsxs(i,{className:"animate-fade-in",children:[e.jsx(u,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(g,{className:"flex items-center gap-2",children:[e.jsx(A,{className:"h-5 w-5 text-primary"}),"Hashtags"]}),e.jsx(c,{variant:"ghost",size:"sm",onClick:()=>p(l,"hashtags"),children:h==="hashtags"?e.jsx(f,{className:"h-4 w-4 text-primary"}):e.jsx(C,{className:"h-4 w-4"})})]})}),e.jsx(r,{children:e.jsx(H,{value:l,readOnly:!0,className:"min-h-[80px] resize-none text-sm"})})]}),e.jsx(i,{className:"animate-fade-in",children:e.jsx(r,{className:"pt-6",children:e.jsxs(c,{onClick:()=>p(`${o} 2 3${l}`,"all"),className:"w-full",size:"lg",children:[h==="all"?e.jsx(f,{className:"h-4 w-4 mr-2"}):e.jsx(C,{className:"h-4 w-4 mr-2"}),"Copy Caption + Hashtags"]})})})]}),e.jsx(U,{content:a})]})]})};export{re 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.