{"version":3,"file":"Logo.CLLJpr4k.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/Cn9Uzick9gQ3YdXHOlWW/pD16czxfTZrwVPpKEUb5/Logo.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const CLIENT_ID=\"1idW1OUXHbiHqCB8pRw\";function isBrandfetchUrl(url){return/cdn\\.brandfetch\\.io/i.test(url);}function brandfetchIcon(domain){return`https://cdn.brandfetch.io/${domain}/icon.png?c=${CLIENT_ID}`;}export default function Logo(props){const{brand_domain,Icon,name,size,radius}=props;const domain=(brand_domain||\"\").trim();const url=(Icon||\"\").trim();const label=(name||\"\").trim()||domain||\"App\";const initials=label.split(\" \").filter(Boolean).slice(0,2).map(w=>w[0]?.toUpperCase()).join(\"\");// ✅ Priority:\n// 1) Use Icon if it exists AND it's not a Brandfetch URL\nconst preferred=url&&!isBrandfetchUrl(url)?url:domain?brandfetchIcon(domain):\"\";const[src,setSrc]=React.useState(preferred);React.useEffect(()=>{setSrc(preferred);},[preferred]);function handleError(){// If Brandfetch failed, and we have a non-brandfetch URL, try it.\nif(isBrandfetchUrl(src)&&url&&!isBrandfetchUrl(url)){setSrc(url);}else{setSrc(\"\")// initials\n;}}return /*#__PURE__*/_jsx(\"div\",{style:{width:size,height:size,borderRadius:radius,overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"rgba(255,255,255,0.06)\"},title:label,children:src?/*#__PURE__*/_jsx(\"img\",{src:src,alt:label,width:size,height:size,loading:\"lazy\",referrerPolicy:\"no-referrer\",onError:handleError,style:{maxWidth:\"100%\",maxHeight:\"100%\",objectFit:\"contain\",display:\"block\"}}):/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",padding:8,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",fontSize:Math.max(11,Math.floor(size*.22)),lineHeight:1.1,fontWeight:700,color:\"rgba(255,255,255,0.9)\"},children:initials||label})});}addPropertyControls(Logo,{brand_domain:{type:ControlType.String,title:\"Domain\"},Icon:{type:ControlType.String,title:\"URL\"},name:{type:ControlType.String,title:\"Name\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:64,min:16,max:256},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:14,min:0,max:64}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Logo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Logo.map"],"mappings":"4KAAiK,SAAS,EAAgB,EAAI,CAAC,MAAM,uBAAuB,KAAK,EAAI,CAAE,SAAS,EAAe,EAAO,CAAC,MAAM,6BAA6B,EAAO,cAAc,IAAa,SAAwB,EAAK,EAAM,CAAC,GAAK,CAAC,eAAa,OAAK,OAAK,OAAK,UAAQ,EAAY,GAAQ,GAAc,IAAI,MAAM,CAAO,GAAK,GAAM,IAAI,MAAM,CAAO,GAAO,GAAM,IAAI,MAAM,EAAE,GAAQ,MAAY,EAAS,EAAM,MAAM,IAAI,CAAC,OAAO,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,IAAI,aAAa,CAAC,CAAC,KAAK,GAAG,CAEzmB,EAAU,GAAK,CAAC,EAAgB,EAAI,CAAC,EAAI,EAAO,EAAe,EAAO,CAAC,GAAQ,CAAC,EAAI,GAAQA,EAAe,EAAU,CAAC,MAAoB,CAAC,EAAO,EAAU,EAAG,CAAC,EAAU,CAAC,CAAC,SAAS,GAAa,CACrM,EAAgB,EAAI,EAAE,GAAK,CAAC,EAAgB,EAAI,CAAE,EAAO,EAAI,CAAO,EAAO,GAAG,CAC9E,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,EAAK,OAAO,EAAK,aAAa,EAAO,SAAS,SAAS,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,W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