// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0-or-later
// @source: https://gitlab.com/soapbox-pub/ditto/-/tree/f0a3877c
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{qi as t}from"./lucide-icons-BdRF0moN.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{t as r}from"./utils-BFSTDHdM.js";import{E as i}from"./blobbi-CLChx8JU.js";import{c as a,i as o,l as s,n as c,o as l}from"./blobbi-shop-items-gin9pdH4.js";import{s as u,t as d}from"./BlobbiStageVisual-Cyhy_5-y.js";import{t as f}from"./useBlobbiInteractions-BR0C9tjk.js";import{n as p,r as m,t as h}from"./FloatingSocialHearts-ChoPyJfb.js";var g=e(t(),1),_=n(),v=e=>c(e)?.effect;function y({event:e,lookMode:t=`forward`,interactionReaction:n}){let c=(0,g.useMemo)(()=>i(e),[e]),y=c?.state===`sleeping`,b=c?.stage===`egg`,{interactions:x}=f(b?null:c??null),{recipe:S,recipeLabel:C}=(0,g.useMemo)(()=>{if(!c||b)return{recipe:o,recipeLabel:`neutral`};let e=x.length>0?x:void 0,{stats:t}=s(c,void 0,e,v),n=a(t),r=l(n.recipe);return{recipe:y?u(r):r,recipeLabel:y?`sleeping`:n.label}},[c,b,y,x]);if(!c)return null;let w=n?.isActive??!1,T=w&&!!n?.emotionOverride;return(0,_.jsxs)(`div`,{className:`flex flex-col items-center py-4`,children:[(0,_.jsxs)(`div`,{className:`relative`,children:[(0,_.jsx)(`div`,{className:`absolute inset-0 -m-8 bg-primary/5 rounded-full blur-3xl`}),(0,_.jsxs)(`div`,{className:r(`relative transition-all duration-500`,w&&n?.bodyAnimation),children:[(0,_.jsx)(d,{companion:c,size:`lg`,animated:!y,lookMode:t,recipe:T?void 0:S,recipeLabel:T?void 0:C,emotion:T?n.emotionOverride??void 0:void 0,className:`size-48 sm:size-56`}),!b&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(m,{active:n?.sparkles??!1}),(0,_.jsx)(p,{active:n?.bubbles??!1}),(0,_.jsx)(h,{active:n?.hearts??!1})]})]})]}),(0,_.jsx)(`h3`,{className:`mt-3 text-xl font-bold text-center`,style:{color:c.visualTraits.baseColor},children:c.name})]})}export{y as BlobbiStateCard};
// @license-end
