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