import{c as z,j as h,r as L}from"./index-XbihxApF.js";import{c as v}from"./button-h0tC9PDp.js";import{n as k}from"./Container-Cz7g68yh.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},y={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-8",md:"min-w-12",lg:"min-w-16"},A={"2xs":8,xs:12,sm:16,md:24,lg:32};function B(g){const e=z.c(7),{icon:s,name:o,size:u,className:n,fallbackIcon:l}=g,t=u===void 0?"md":u,x=s??"no-icon";let c;return e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==o||e[4]!==t||e[5]!==x?(c=h.jsx(R,{icon:s,name:o,size:t,className:n,fallbackIcon:l},x),e[0]=n,e[1]=l,e[2]=s,e[3]=o,e[4]=t,e[5]=x,e[6]=c):c=e[6],c}function R(g){const e=z.c(24),{icon:s,name:o,size:u,className:n,fallbackIcon:l}=g,t=u===void 0?"md":u,[x,c]=L.useState(!1),_=!!s&&x,j=C[t],p=y[t];let i;e[0]!==n||e[1]!==j||e[2]!==p?(i=v("rounded-lg border border-border shrink-0 overflow-hidden aspect-square",j,p,n),e[0]=n,e[1]=j,e[2]=p,e[3]=i):i=e[3];const b=s||void 0,E=!_&&"hidden";let r;e[4]!==E?(r=v("h-full w-full object-cover",E),e[4]=E,e[5]=r):r=e[5];let w,I;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=()=>c(!1),I=()=>c(!0),e[6]=w,e[7]=I):(w=e[6],I=e[7]);let a;e[8]!==o||e[9]!==b||e[10]!==r?(a=h.jsx("img",{src:b,alt:o,className:r,onError:w,onLoad:I}),e[8]=o,e[9]=b,e[10]=r,e[11]=a):a=e[11];const N=_&&"hidden";let m;e[12]!==N?(m=v("h-full w-full flex items-center justify-center bg-muted/20",N),e[12]=N,e[13]=m):m=e[13];let d;e[14]!==l||e[15]!==t?(d=l??h.jsx(k,{size:A[t],className:"text-muted-foreground"}),e[14]=l,e[15]=t,e[16]=d):d=e[16];let f;e[17]!==m||e[18]!==d?(f=h.jsx("div",{className:m,children:d}),e[17]=m,e[18]=d,e[19]=f):f=e[19];let S;return e[20]!==a||e[21]!==f||e[22]!==i?(S=h.jsxs("div",{className:i,children:[a,f]}),e[20]=a,e[21]=f,e[22]=i,e[23]=S):S=e[23],S}export{B as I};
