import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,t as n}from"./jsx-runtime-CiQ1k8xo.js";import{t as r}from"./clsx-BcPLHiun.js";import{lt as i}from"./vscode-api-DjORcpSo.js";import{n as a,t as o}from"./known-app-icon-BEI7OXDu.js";import{u as s,x as c}from"./apps-queries-D95oCTjw.js";import{t as l}from"./use-is-dark-DM2fOM7F.js";var u=i(),d=e(t(),1),f=n();function p(e){let t=(0,u.c)(28),{alt:n,appInfo:i,className:a,knownAppId:o,logoUrl:s,logoDarkUrl:p,fallback:g}=e,y=l()===!0,b,x,S,C,w;if(t[0]!==i||t[1]!==a||t[2]!==g||t[3]!==y||t[4]!==o||t[5]!==p||t[6]!==s){w=Symbol.for(`react.early_return_sentinel`);bb0:{x=r(`rounded-2xs`,a);let e;t[12]!==i||t[13]!==o?(e=m({appInfo:i,knownAppId:o}),t[12]=i,t[13]=o,t[14]=e):e=t[14];let n=e;if(n!=null){let e;t[15]!==n||t[16]!==a?(e=(0,f.jsx)(n,{"aria-hidden":!0,className:a}),t[15]=n,t[16]=a,t[17]=e):e=t[17],w=e;break bb0}if(S=h({logoUrl:s??i?.logoUrl,logoDarkUrl:p??i?.logoUrlDark,isDarkTheme:y}),b=(0,d.cloneElement)(g,{className:r(x,g.props.className)}),S==null){w=b;break bb0}C=c(S)}t[0]=i,t[1]=a,t[2]=g,t[3]=y,t[4]=o,t[5]=p,t[6]=s,t[7]=b,t[8]=x,t[9]=S,t[10]=C,t[11]=w}else b=t[7],x=t[8],S=t[9],C=t[10],w=t[11];if(w!==Symbol.for(`react.early_return_sentinel`))return w;let T=C;if(T!=null){let e;return t[18]!==n||t[19]!==T||t[20]!==b||t[21]!==x?(e=(0,f.jsx)(_,{className:x,alt:n,connectorLogoRequest:T,fallback:b}),t[18]=n,t[19]=T,t[20]=b,t[21]=x,t[22]=e):e=t[22],e}let E;return t[23]!==n||t[24]!==b||t[25]!==x||t[26]!==S?(E=(0,f.jsx)(v,{alt:n,className:x,src:S,fallback:b},S),t[23]=n,t[24]=b,t[25]=x,t[26]=S,t[27]=E):E=t[27],E}function m({appInfo:e,knownAppId:t}){if(e!=null){let t=a(e);if(t!=null)return t}return t==null?null:o(t)}function h({logoUrl:e,logoDarkUrl:t,isDarkTheme:n}){let r=g(e),i=g(t);return n?i??r:r??i}function g(e){let t=e?.trim();return t==null||t.length===0?null:t}function _(e){let t=(0,u.c)(5),{className:n,alt:r,connectorLogoRequest:i,fallback:a}=e,o=s(i);if(o==null)return a;let c;return t[0]!==r||t[1]!==n||t[2]!==o||t[3]!==a?(c=(0,f.jsx)(v,{className:n,alt:r,fallback:a,src:o},o),t[0]=r,t[1]=n,t[2]=o,t[3]=a,t[4]=c):c=t[4],c}function v(e){let t=(0,u.c)(7),{alt:n,className:i,src:a,fallback:o}=e,[s,c]=(0,d.useState)(!1);if(s)return o;let l;t[0]===i?l=t[1]:(l=r(`object-contain`,i),t[0]=i,t[1]=l);let p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{c(!0)},t[2]=p):p=t[2];let m;return t[3]!==n||t[4]!==a||t[5]!==l?(m=(0,f.jsx)(`img`,{alt:n,className:l,src:a,onError:p}),t[3]=n,t[4]=a,t[5]=l,t[6]=m):m=t[6],m}export{p as t};
//# sourceMappingURL=connector-logo-LTIDLNMj.js.map