bolt.new / build /client /assets /GithubConnection-CbiR-UTi.js
GamerC0der
Add application file
bf8b26e
import{r as m,R as U,j as e}from"./components-BZZ5qraN.js";import{m as z,c as g,B as E,C as D,a as B,b as J,d as b}from"./Header-_ZzJQ23m.js";import{a as i,l as P}from"./client-only-CyVJyMfm.js";const q=()=>e.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",children:e.jsx("path",{fill:"currentColor",d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})});function ee(){const[r,c]=m.useState({user:null,token:"",tokenType:"classic"}),[A,y]=m.useState(!0),[x,N]=m.useState(!1),[p,w]=m.useState(!1),[S,F]=m.useState(!1),u=U.useRef("classic"),H=async t=>{try{console.log("Fetching GitHub user with token:",t.substring(0,5)+"...");const s=await fetch("/api/system/git-info?action=getUser",{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!s.ok)throw console.error("Error fetching GitHub user. Status:",s.status),new Error(`Error: ${s.status}`);const n={limit:parseInt(s.headers.get("x-ratelimit-limit")||"0"),remaining:parseInt(s.headers.get("x-ratelimit-remaining")||"0"),reset:parseInt(s.headers.get("x-ratelimit-reset")||"0")},a=await s.json();console.log("GitHub user API response:",a);const{user:l}=a;if(!l||!l.login)throw console.error("Invalid user data received:",l),new Error("Invalid user data received");c(d=>({...d,user:l,token:t,tokenType:u.current,rateLimit:n})),i.set("githubUsername",l.login),i.set("githubToken",t),i.set("git:github.com",JSON.stringify({username:t,password:"x-oauth-basic"})),localStorage.setItem("github_connection",JSON.stringify({user:l,token:t,tokenType:u.current})),P.logInfo("Connected to GitHub",{type:"system",message:`Connected to GitHub as ${l.login}`}),f(t)}catch(s){throw console.error("Failed to fetch GitHub user:",s),P.logError(`GitHub authentication failed: ${s instanceof Error?s.message:"Unknown error"}`,{type:"system",message:"GitHub authentication failed"}),b.error(`Authentication failed: ${s instanceof Error?s.message:"Unknown error"}`),s}},f=async t=>{w(!0);try{const s=await fetch("https://api.github.com/user",{headers:{Authorization:`${r.tokenType==="classic"?"token":"Bearer"} ${t}`}});if(!s.ok){if(s.status===401){b.error("Your GitHub token has expired. Please reconnect your account."),C();return}throw new Error(`Failed to fetch user data: ${s.statusText}`)}const n=await s.json();let a=[],l=1,d=!0;for(;d;){const o=await fetch(`https://api.github.com/user/repos?per_page=100&page=${l}`,{headers:{Authorization:`${r.tokenType==="classic"?"token":"Bearer"} ${t}`}});if(!o.ok)throw new Error(`Failed to fetch repositories: ${o.statusText}`);const h=await o.json();a=[...a,...h],d=o.headers.get("Link")?.includes('rel="next"')??!1,l++}const v=I(a),j=await fetch(`https://api.github.com/users/${n.login}/events?per_page=10`,{headers:{Authorization:`${r.tokenType==="classic"?"token":"Bearer"} ${t}`}});if(!j.ok)throw new Error(`Failed to fetch events: ${j.statusText}`);const $=(await j.json()).slice(0,5).map(o=>({id:o.id,type:o.type,repo:o.repo.name,created_at:o.created_at})),T=a.reduce((o,h)=>o+h.stargazers_count,0),_=a.reduce((o,h)=>o+h.forks_count,0),L=a.filter(o=>o.private).length,O={repos:v.repos,recentActivity:$,languages:v.languages||{},totalGists:v.totalGists||0,publicRepos:n.public_repos||0,privateRepos:L||0,stars:T||0,forks:_||0,followers:n.followers||0,publicGists:n.public_gists||0,privateGists:n.private_gists||0,lastUpdated:new Date().toISOString(),totalStars:T||0,totalForks:_||0,organizations:[]},G={user:JSON.parse(localStorage.getItem("github_connection")||"{}").user||r.user,token:t,tokenType:r.tokenType,stats:O,rateLimit:r.rateLimit};localStorage.setItem("github_connection",JSON.stringify(G)),c(G),b.success("GitHub stats refreshed")}catch(s){console.error("Error fetching GitHub stats:",s),b.error(`Failed to fetch GitHub stats: ${s instanceof Error?s.message:"Unknown error"}`)}finally{w(!1)}},I=t=>{const s={repos:t.map(n=>({name:n.name,full_name:n.full_name,html_url:n.html_url,description:n.description,stargazers_count:n.stargazers_count,forks_count:n.forks_count,default_branch:n.default_branch,updated_at:n.updated_at,languages_url:n.languages_url})),languages:{},totalGists:0};return t.forEach(n=>{fetch(n.languages_url).then(a=>a.json()).then(a=>{Object.keys(a).forEach(d=>{s.languages[d]||(s.languages[d]=0),s.languages[d]+=1})})}),s};m.useEffect(()=>{(async()=>{y(!0);const s=localStorage.getItem("github_connection");if(s)try{const n=JSON.parse(s);n.tokenType||(n.tokenType="classic"),u.current=n.tokenType,c(n),n.user&&n.token&&(!n.stats||!n.stats.repos||n.stats.repos.length===0)&&(console.log("Fetching missing GitHub stats for saved connection"),await f(n.token))}catch(n){console.error("Error parsing saved GitHub connection:",n),localStorage.removeItem("github_connection")}y(!1)})()},[]),m.useEffect(()=>{if(!r)return;const t=r.token,s=r.user;t&&(i.set("githubToken",t),i.set("git:github.com",JSON.stringify({username:t,password:"x-oauth-basic"}))),s&&i.set("githubUsername",s.login)},[r]);const k=async t=>{try{const s=await fetch("https://api.github.com/rate_limit",{headers:{Authorization:`Bearer ${t}`,Accept:"application/vnd.github.v3+json"}});if(s.ok){const n={limit:parseInt(s.headers.get("x-ratelimit-limit")||"0"),remaining:parseInt(s.headers.get("x-ratelimit-remaining")||"0"),reset:parseInt(s.headers.get("x-ratelimit-reset")||"0")};c(a=>({...a,rateLimit:n}))}}catch(s){console.error("Failed to fetch rate limits:",s)}};if(m.useEffect(()=>{let t;return r.token&&r.user&&(k(r.token),t=setInterval(()=>k(r.token),6e4)),()=>{t&&clearInterval(t)}},[r.token,r.user]),A||x||p)return e.jsx(M,{});const R=async t=>{t.preventDefault(),N(!0);try{u.current=r.tokenType,localStorage.setItem("github_connection",JSON.stringify({user:null,token:r.token,tokenType:r.tokenType})),await H(r.token),b.success("Connected to GitHub successfully")}catch(s){console.error("Failed to connect to GitHub:",s),c({user:null,token:r.token,tokenType:r.tokenType}),b.error(`Failed to connect to GitHub: ${s instanceof Error?s.message:"Unknown error"}`)}finally{N(!1)}},C=()=>{localStorage.removeItem("github_connection"),i.remove("githubToken"),i.remove("githubUsername"),i.remove("git:github.com"),u.current="classic",c({user:null,token:"",tokenType:"classic"}),b.success("Disconnected from GitHub")};return e.jsx(z.div,{className:"bg-bolt-elements-background dark:bg-bolt-elements-background border border-bolt-elements-borderColor dark:border-bolt-elements-borderColor rounded-lg",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{}),e.jsx("h3",{className:"text-base font-medium text-bolt-elements-textPrimary dark:text-bolt-elements-textPrimary",children:"GitHub Connection"})]})}),!r.user&&e.jsxs("div",{className:"text-xs text-bolt-elements-textSecondary bg-bolt-elements-background-depth-1 dark:bg-bolt-elements-background-depth-1 p-3 rounded-lg mb-4",children:[e.jsxs("p",{className:"flex items-center gap-1 mb-1",children:[e.jsx("span",{className:"i-ph:lightbulb w-3.5 h-3.5 text-bolt-elements-icon-success dark:text-bolt-elements-icon-success"}),e.jsx("span",{className:"font-medium",children:"Tip:"})," You can also set the"," ",e.jsx("code",{className:"px-1 py-0.5 bg-bolt-elements-background-depth-2 dark:bg-bolt-elements-background-depth-2 rounded",children:"VITE_GITHUB_ACCESS_TOKEN"})," ","environment variable to connect automatically."]}),e.jsxs("p",{children:["For fine-grained tokens, also set"," ",e.jsx("code",{className:"px-1 py-0.5 bg-bolt-elements-background-depth-2 dark:bg-bolt-elements-background-depth-2 rounded",children:"VITE_GITHUB_TOKEN_TYPE=fine-grained"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-bolt-elements-textSecondary dark:text-bolt-elements-textSecondary mb-2",children:"Token Type"}),e.jsxs("select",{value:r.tokenType,onChange:t=>{const s=t.target.value;u.current=s,c(n=>({...n,tokenType:s}))},disabled:x||!!r.user,className:g("w-full px-3 py-2 rounded-lg text-sm","bg-bolt-elements-background-depth-1 dark:bg-bolt-elements-background-depth-1","border border-bolt-elements-borderColor dark:border-bolt-elements-borderColor","text-bolt-elements-textPrimary dark:text-bolt-elements-textPrimary","focus:outline-none focus:ring-1 focus:ring-bolt-elements-item-contentAccent dark:focus:ring-bolt-elements-item-contentAccent","disabled:opacity-50"),children:[e.jsx("option",{value:"classic",children:"Personal Access Token (Classic)"}),e.jsx("option",{value:"fine-grained",children:"Fine-grained Token"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-bolt-elements-textSecondary dark:text-bolt-elements-textSecondary mb-2",children:r.tokenType==="classic"?"Personal Access Token":"Fine-grained Token"}),e.jsx("input",{type:"password",value:r.token,onChange:t=>c(s=>({...s,token:t.target.value})),disabled:x||!!r.user,placeholder:`Enter your GitHub ${r.tokenType==="classic"?"personal access token":"fine-grained token"}`,className:g("w-full px-3 py-2 rounded-lg text-sm","bg-[#F8F8F8] dark:bg-[#1A1A1A]","border border-[#E5E5E5] dark:border-[#333333]","text-bolt-elements-textPrimary placeholder-bolt-elements-textTertiary","focus:outline-none focus:ring-1 focus:ring-bolt-elements-borderColorActive","disabled:opacity-50")}),e.jsxs("div",{className:"mt-2 text-sm text-bolt-elements-textSecondary",children:[e.jsxs("a",{href:`https://github.com/settings/tokens${r.tokenType==="fine-grained"?"/beta":"/new"}`,target:"_blank",rel:"noopener noreferrer",className:"text-bolt-elements-borderColorActive hover:underline inline-flex items-center gap-1",children:["Get your token",e.jsx("div",{className:"i-ph:arrow-square-out w-4 h-4"})]}),e.jsx("span",{className:"mx-2",children:"•"}),e.jsxs("span",{children:["Required scopes:"," ",r.tokenType==="classic"?"repo, read:org, read:user":"Repository access, Organization access"]})]})]})]}),e.jsx("div",{className:"flex items-center justify-between",children:r.user?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("button",{onClick:C,className:g("px-4 py-2 rounded-lg text-sm flex items-center gap-2","bg-red-500 text-white","hover:bg-red-600"),children:[e.jsx("div",{className:"i-ph:plug w-4 h-4"}),"Disconnect"]}),e.jsxs("span",{className:"text-sm text-bolt-elements-textSecondary flex items-center gap-1",children:[e.jsx("div",{className:"i-ph:check-circle w-4 h-4 text-green-500"}),"Connected to GitHub"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(E,{variant:"outline",onClick:()=>window.open("https://github.com/dashboard","_blank","noopener,noreferrer"),className:"flex items-center gap-2 hover:bg-bolt-elements-item-backgroundActive/10 hover:text-bolt-elements-textPrimary dark:hover:text-bolt-elements-textPrimary transition-colors",children:[e.jsx("div",{className:"i-ph:layout w-4 h-4"}),"Dashboard"]}),e.jsx(E,{onClick:()=>{f(r.token),k(r.token)},disabled:p,variant:"outline",className:"flex items-center gap-2 hover:bg-bolt-elements-item-backgroundActive/10 hover:text-bolt-elements-textPrimary dark:hover:text-bolt-elements-textPrimary transition-colors",children:p?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"i-ph:spinner-gap w-4 h-4 animate-spin"}),"Refreshing..."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"i-ph:arrows-clockwise w-4 h-4"}),"Refresh Stats"]})})]})]})}):e.jsx("button",{onClick:R,disabled:x||!r.token,className:g("px-4 py-2 rounded-lg text-sm flex items-center gap-2","bg-[#303030] text-white","hover:bg-[#5E41D0] hover:text-white","disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200","transform active:scale-95"),children:x?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"i-ph:spinner-gap animate-spin"}),"Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"i-ph:plug-charging w-4 h-4"}),"Connect"]})})}),r.user&&r.stats&&e.jsxs("div",{className:"mt-6 border-t border-bolt-elements-borderColor dark:border-bolt-elements-borderColor pt-6",children:[e.jsxs("div",{className:"flex items-center gap-4 p-4 bg-bolt-elements-background-depth-1 dark:bg-bolt-elements-background-depth-1 rounded-lg mb-4",children:[e.jsx("img",{src:r.user.avatar_url,alt:r.user.login,className:"w-12 h-12 rounded-full border-2 border-bolt-elements-item-contentAccent dark:border-bolt-elements-item-contentAccent"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-bolt-elements-textPrimary dark:text-bolt-elements-textPrimary",children:r.user.name||r.user.login}),e.jsx("p",{className:"text-sm text-bolt-elements-textSecondary dark:text-bolt-elements-textSecondary",children:r.user.login})]})]}),e.jsxs(D,{open:S,onOpenChange:F,children:[e.jsx(B,{asChild:!0,children:e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-bolt-elements-background dark:bg-bolt-elements-background-depth-2 border border-bolt-elements-borderColor dark:border-bolt-elements-borderColor hover:border-bolt-elements-borderColorActive/70 dark:hover:border-bolt-elements-borderColorActive/70 transition-all duration-200",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"i-ph:chart-bar w-4 h-4 text-bolt-elements-item-contentAccent"}),e.jsx("span",{className:"text-sm font-medium text-bolt-elements-textPrimary",children:"GitHub Stats"})]}),e.jsx("div",{className:g("i-ph:caret-down w-4 h-4 transform transition-transform duration-200 text-bolt-elements-textSecondary",S?"rotate-180":"")})]})}),e.jsx(J,{className:"overflow-hidden",children:e.jsxs("div",{className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-sm font-medium text-bolt-elements-textPrimary mb-3",children:"Top Languages"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(r.stats.languages).sort(([,t],[,s])=>s-t).slice(0,5).map(([t])=>e.jsx("span",{className:"px-3 py-1 text-xs rounded-full bg-bolt-elements-sidebar-buttonBackgroundDefault text-bolt-elements-sidebar-buttonText",children:t},t))})]}),e.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[{label:"Member Since",value:new Date(r.user.created_at).toLocaleDateString()},{label:"Public Gists",value:r.stats.publicGists},{label:"Organizations",value:r.stats.organizations?r.stats.organizations.length:0},{label:"Languages",value:Object.keys(r.stats.languages).length}].map((t,s)=>e.jsxs("div",{className:"flex flex-col p-3 rounded-lg bg-bolt-elements-background-depth-2 dark:bg-bolt-elements-background-depth-2 border border-bolt-elements-borderColor dark:border-bolt-elements-borderColor",children:[e.jsx("span",{className:"text-xs text-bolt-elements-textSecondary",children:t.label}),e.jsx("span",{className:"text-lg font-medium text-bolt-elements-textPrimary",children:t.value})]},s))}),e.jsx("div",{className:"mt-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"text-sm font-medium text-bolt-elements-textPrimary mb-2",children:"Repository Stats"}),e.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{label:"Public Repos",value:r.stats.publicRepos},{label:"Private Repos",value:r.stats.privateRepos}].map((t,s)=>e.jsxs("div",{className:"flex flex-col p-3 rounded-lg bg-bolt-elements-background-depth-2 dark:bg-bolt-elements-background-depth-2 border border-bolt-elements-borderColor dark:border-bolt-elements-borderColor",children:[e.jsx("span",{className:"text-xs text-bolt-elements-textSecondary",children:t.label}),e.jsx("span",{className:"text-lg font-medium text-bolt-elements-textPrimary",children:t.value})]},s))})]}),e.jsxs("div",{children:[e.jsx("h5",{className:"text-sm font-medium text-bolt-elements-textPrimary mb-2",children:"Contribution Stats"}),e.jsx("div",{className:"grid grid-cols-3 gap-4",children:[{label:"Stars",value:r.stats.stars||0,icon:"i-ph:star",iconColor:"text-bolt-elements-icon-warning"},{label:"Forks",value:r.stats.forks||0,icon:"i-ph:git-fork",iconColor:"text-bolt-elements-icon-info"},{label:"Followers",value:r.stats.followers||0,icon:"i-ph:users",iconColor:"text-bolt-elements-icon-success"}].map((t,s)=>e.jsxs("div",{className:"flex flex-col p-3 rounded-lg bg-bolt-elements-background-depth-2 dark:bg-bolt-elements-background-depth-2 border border-bolt-elements-borderColor dark:border-bolt-elements-borderColor",children:[e.jsx("span",{className:"text-xs text-bolt-elements-textSecondary",children:t.label}),e.jsxs("span",{className:"text-lg font-medium text-bolt-elements-textPrimary flex items-center gap-1",children:[e.jsx("div",{className:`${t.icon} w-4 h-4 ${t.iconColor}`}),t.value]})]},s))})]}),e.jsxs("div",{children:[e.jsx("h5",{className:"text-sm font-medium text-bolt-elements-textPrimary mb-2",children:"Gists"}),e.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{label:"Public",value:r.stats.publicGists},{label:"Private",value:r.stats.privateGists||0}].map((t,s)=>e.jsxs("div",{className:"flex flex-col p-3 rounded-lg bg-bolt-elements-background-depth-2 dark:bg-bolt-elements-background-depth-2 border border-bolt-elements-borderColor dark:border-bolt-elements-borderColor",children:[e.jsx("span",{className:"text-xs text-bolt-elements-textSecondary",children:t.label}),e.jsx("span",{className:"text-lg font-medium text-bolt-elements-textPrimary",children:t.value})]},s))})]}),e.jsx("div",{className:"pt-2 border-t border-bolt-elements-borderColor",children:e.jsxs("span",{className:"text-xs text-bolt-elements-textSecondary",children:["Last updated: ",new Date(r.stats.lastUpdated).toLocaleString()]})})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h4",{className:"text-sm font-medium text-bolt-elements-textPrimary",children:"Recent Repositories"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:r.stats.repos.map(t=>e.jsx("a",{href:t.html_url,target:"_blank",rel:"noopener noreferrer",className:"group block p-4 rounded-lg bg-bolt-elements-background-depth-1 dark:bg-bolt-elements-background-depth-1 border border-bolt-elements-borderColor dark:border-bolt-elements-borderColor hover:border-bolt-elements-borderColorActive dark:hover:border-bolt-elements-borderColorActive transition-all duration-200",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"i-ph:git-branch w-4 h-4 text-bolt-elements-icon-tertiary"}),e.jsx("h5",{className:"text-sm font-medium text-bolt-elements-textPrimary group-hover:text-bolt-elements-item-contentAccent transition-colors",children:t.name})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-bolt-elements-textSecondary",children:[e.jsxs("span",{className:"flex items-center gap-1",title:"Stars",children:[e.jsx("div",{className:"i-ph:star w-3.5 h-3.5 text-bolt-elements-icon-warning"}),t.stargazers_count.toLocaleString()]}),e.jsxs("span",{className:"flex items-center gap-1",title:"Forks",children:[e.jsx("div",{className:"i-ph:git-fork w-3.5 h-3.5 text-bolt-elements-icon-info"}),t.forks_count.toLocaleString()]})]})]}),t.description&&e.jsx("p",{className:"text-xs text-bolt-elements-textSecondary line-clamp-2",children:t.description}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-bolt-elements-textSecondary",children:[e.jsxs("span",{className:"flex items-center gap-1",title:"Default Branch",children:[e.jsx("div",{className:"i-ph:git-branch w-3.5 h-3.5"}),t.default_branch]}),e.jsxs("span",{className:"flex items-center gap-1",title:"Last Updated",children:[e.jsx("div",{className:"i-ph:clock w-3.5 h-3.5"}),new Date(t.updated_at).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]}),e.jsxs("span",{className:"flex items-center gap-1 ml-auto group-hover:text-bolt-elements-item-contentAccent transition-colors",children:[e.jsx("div",{className:"i-ph:arrow-square-out w-3.5 h-3.5"}),"View"]})]})]})},t.full_name))})]})]})})]})]})]})})}function M(){return e.jsx("div",{className:"flex items-center justify-center p-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"i-ph:spinner-gap-bold animate-spin w-4 h-4"}),e.jsx("span",{className:"text-bolt-elements-textSecondary",children:"Loading..."})]})})}export{ee as default};