(function(){try{var g=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};g["__faroBundleId_hub-ui"]="1776810161225-1149c77e14"}catch(l){}})();import{j as m}from"./c2heove9.js";import{l as c}from"./m6px07lc.js";import{a as d}from"./g811ww8h.js";import{S as i}from"./i5k57vg2.js";function h({repository:o}){const{has_starred:a,star_count:r,name:n,namespace:s}=o??{},{submit:p,data:e}=c();return m.jsx(i,{isStarred:e?.starred??a,starCount:e?.star_count??r,onToggleStar:()=>{const t=new FormData;t.append("namespace",s),t.append("reponame",n),t.append("starred",String(!a)),t.append("star_count",String(r)),p(t,{method:"POST",action:d("/resources/toggle-repo-stars")})}})}export{h as S};