import{B as e,Ft as t,H as n,It as r,Mt as i,Q as a,V as o,W as s,Z as c,_t as l,at as u,d,ft as f,ht as p,i as m,jt as h,mt as g,ot as _,pt as v,s as y,st as b,tt as x,x as S}from"../chunks/BA99CCI5.js";import{t as C}from"../chunks/BJ4akexL.js";import"../chunks/xihTtKlq.js";import"../chunks/DGo8yE5j.js";import{t as w}from"../chunks/DvoiSP5r.js";import{t as T}from"../chunks/DCohNkHF.js";var E=s(`<div class="aspect-video w-full"><iframe title="YouTube video" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" class="h-full w-full"></iframe></div>`),D=s(`<div class="p-12 text-center"><p class="mb-4 text-2xl text-neutral-700 dark:text-neutral-300">Here's your tweet:</p> <a target="_blank" rel="noopener noreferrer" class="text-xl text-blue-600 hover:underline dark:text-blue-400"> </a></div>`),O=s(`<div class="p-12 text-center"><p class="mb-4 text-2xl text-neutral-700 dark:text-neutral-300">Here's your Reddit post:</p> <a target="_blank" rel="noopener noreferrer" class="text-xl text-blue-600 hover:underline dark:text-blue-400"> </a></div>`),k=s(`<div class="p-12 text-center"><p class="mb-4 text-2xl text-neutral-700 dark:text-neutral-300">Here's what you tried to link:</p> <a target="_blank" rel="noopener noreferrer" class="text-xl text-blue-600 hover:underline dark:text-blue-400"> </a></div>`),A=s(`<!> <div class="flex min-h-screen items-center bg-white p-8 dark:bg-neutral-950"><div class="mx-auto w-full max-w-4xl space-y-6"><div class="text-center"><p class="text-2xl font-medium text-neutral-900 dark:text-neutral-50">If you insist...</p></div> <div class="overflow-hidden rounded-2xl border border-neutral-200 bg-white shadow-2xl dark:border-neutral-800 dark:bg-neutral-900"><!></div> <div class="flex flex-wrap items-center justify-center gap-4 text-center text-neutral-600 dark:text-neutral-400"><p>You need to link a <strong class="text-neutral-900 dark:text-neutral-50">GitHub repository</strong></p> <a class="inline-flex items-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600"><!> Try Again</a></div></div></div>`,1);function j(s,j){i(j,!1);let M=p(),N=y(j,`data`,8);m(()=>{C.add(`error`,`bruh`,8e3)});function P(e){let t=e.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([^&\n?#]+)/);return t?`https://www.youtube.com/embed/${t[1]}?autoplay=1`:``}u(()=>c(N()),()=>{l(M,N().type===`youtube`?P(N().url):``)}),_(),d();var F=A(),I=v(F);T(I,{title:`Bruh`});var L=g(I,2),R=f(L),z=g(f(R),2),B=f(z),V=e=>{var t=E(),i=f(t);r(t),b(()=>S(i,`src`,a(M))),n(e,t)},H=e=>{var t=D(),i=g(f(t),2),a=f(i,!0);r(i),r(t),b(()=>{S(i,`href`,(c(N()),x(()=>N().url))),o(a,(c(N()),x(()=>N().url)))}),n(e,t)},U=e=>{var t=O(),i=g(f(t),2),a=f(i,!0);r(i),r(t),b(()=>{S(i,`href`,(c(N()),x(()=>N().url))),o(a,(c(N()),x(()=>N().url)))}),n(e,t)},W=e=>{var t=k(),i=g(f(t),2),a=f(i,!0);r(i),r(t),b(()=>{S(i,`href`,(c(N()),x(()=>N().url))),o(a,(c(N()),x(()=>N().url)))}),n(e,t)};e(B,e=>{c(N()),a(M),x(()=>N().type===`youtube`&&a(M))?e(V):(c(N()),x(()=>N().type===`twitter`)?e(H,1):(c(N()),x(()=>N().type===`reddit`)?e(U,2):e(W,-1)))}),r(z);var G=g(z,2),K=g(f(G),2),q=f(K);w(q,{size:16}),t(),r(K),r(G),r(R),r(L),b((e,t,n,r,i)=>S(K,`href`,`/databases/new?name=${e??``}&branch=${t??``}&sync_strategy=${n??``}&auto_pull=${r??``}&local_ops_enabled=${i??``}`),[()=>(c(N()),x(()=>encodeURIComponent(N().formData.name))),()=>(c(N()),x(()=>encodeURIComponent(N().formData.branch))),()=>(c(N()),x(()=>encodeURIComponent(N().formData.syncStrategy))),()=>(c(N()),x(()=>encodeURIComponent(N().formData.autoPull))),()=>(c(N()),x(()=>encodeURIComponent(N().formData.localOpsEnabled)))]),n(s,F),h()}export{j as component};