import{_ as l,by as r,o as h,b as p,l as u,f as k}from"./i4_0wS5w.js";const m={props:{contentId:{type:Number},contentUrl:{type:String}},data(){return{isChecked:!1,displayStar:!1}},async mounted(){const e=await r.getUserInfo();((e==null?void 0:e.favoriteContent)??[]).map(s=>{s.id===this.contentId&&(this.isChecked=!0)}),this.displayStar=!0},methods:{toggleStar(){this.isChecked=!this.isChecked,r.toggleContentFavorite(this.contentId,this.contentUrl,this.isChecked)}}};function _(e,c,s,f,t,a){var o,n,i;const d=k;return t.displayStar?(h(),p(d,{key:0,icon:(o=e.$ss)!=null&&o.useNewDesign?t.isChecked===!0?"mdi:bookmark":"mdi:bookmark-outline":t.isChecked===!0?"ant-design:star-filled":"akar-icons:star",width:(n=e.$ss)!=null&&n.useNewDesign?20:32,"icon-color":(i=e.$ss)!=null&&i.useNewDesign?"#868686":"gold",onClick:a.toggleStar},null,8,["icon","width","icon-color","onClick"])):u("",!0)}const C=l(m,[["render",_]]);export{C as _};