import{a as f,c as w}from"./DfJuU3Os.js";import{u as _}from"./ghxettIg.js";import{f as m,s as p,v as r,o as d,c as i,_ as v,a as g}from"./DAzNq8Te.js";const b=m({__name:"btn-follow",props:p({targetId:{}},{isFollowed:{type:Boolean,required:!0},isFollowedModifiers:{},followed:{},followedModifiers:{}}),emits:["update:isFollowed","update:followed"],setup(l){const a=l,n=r(l,"isFollowed");r(l,"followed");const{showToast:t}=_();async function c(){const{code:s,data:o,msg:e}=await f(a.targetId);s===0?(n.value=!0,t("已关注")):t(e)}async function u(){const{code:s,data:o,msg:e}=await w(a.targetId);s===0?(n.value=!1,t("已取消关注")):t(e)}return(s,o)=>n.value?(d(),i("button",{key:0,class:"btn_follow followed",onClick:o[0]||(o[0]=e=>u())},"已关注")):(d(),i("button",{key:1,class:"btn_follow",onClick:o[1]||(o[1]=e=>c())},"关注"))}}),M=v(b,[["__scopeId","data-v-b43f7575"]]),F={style:{"vertical-align":"middle"},viewBox:"0 0 24 24",width:"1em",height:"1em"},h=g("path",{fill:"currentColor","fill-rule":"evenodd",d:"M8.512 4.43a.75.75 0 0 1 1.057.082l6 7a.75.75 0 0 1 0 .976l-6 7a.75.75 0 0 1-1.138-.976L14.012 12L8.431 5.488a.75.75 0 0 1 .08-1.057","clip-rule":"evenodd"},null,-1),k=[h];function x(l,a){return d(),i("svg",F,[...k])}const I={name:"solar-alt-arrow-right-outline",render:x};export{I as _,M as a};
