{"version":3,"file":"Logo.BzD2QYZU.mjs","names":["SrcType"],"sources":["https:/framerusercontent.com/modules/IQXqjAGXltPKLdfjcdtf/AdYVRfUvx2HLE5qL3Xfw/Logo.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{NullState}from\"https://framer.com/m/framer/icon-nullstate.js@0.7.0\";var SrcType;(function(SrcType){SrcType[\"Upload\"]=\"Upload\";SrcType[\"Url\"]=\"URL\";})(SrcType||(SrcType={}));const baseUrl=\"https://logo.clearbit.com/\";const getLogoUrl=company=>{if(!company)return null;return company.includes(\".\")?`${baseUrl}${company}?size=500`:`${baseUrl}${company}.com?size=500`;};/**\n * @framerIntrinsicWidth 64\n * @framerIntrinsicHeight 64\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export default function Logo(props){const{company,radius,isSearch,srcType,srcUrl,srcFile,style}=props;const logoURL=useMemo(()=>{if(isSearch)return getLogoUrl(company);if(srcType===SrcType.Upload)return srcFile;if(srcType===SrcType.Url)return srcUrl;return null;},[company,isSearch,srcType,srcUrl,srcFile]);const isOnCanvas=RenderTarget.current()===RenderTarget.canvas;const emptyState=isOnCanvas?/*#__PURE__*/ _jsx(NullState,{}):null;return logoURL?/*#__PURE__*/ _jsx(\"img\",{src:logoURL,style:{...baseStyles,...style,borderRadius:radius},alt:\"Logo\"}):emptyState;};Logo.defaultProps={company:\"Framer\",radius:100,width:64,height:64,isSearch:true};const baseStyles={position:\"absolute\",left:0,right:0,top:0,bottom:0,width:\"100%\",height:\"100%\"};addPropertyControls(Logo,{isSearch:{type:ControlType.Boolean,title:\"Type\",disabledTitle:\"Custom\",enabledTitle:\"Search\"},srcType:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Source\",options:[SrcType.Url,SrcType.Upload],hidden:({isSearch})=>isSearch},srcUrl:{type:ControlType.String,title:\" \",placeholder:\"../example.jpg\",hidden:({srcType,isSearch})=>srcType===SrcType.Upload||isSearch},srcFile:{type:ControlType.File,title:\" \",allowedFileTypes:[\"jpg\",\"png\",\"jpeg\",\"tiff\",\"gif\"],hidden:({srcType,isSearch})=>srcType===SrcType.Url||isSearch},company:{type:ControlType.String,title:\"Company\",placeholder:\"Github, Apple...\",hidden:({isSearch})=>!isSearch},radius:{type:ControlType.Number,min:0,max:100,title:\"Radius\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Logo\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"64\",\"framerIntrinsicHeight\":\"64\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Logo.map"],"mappings":"0WAMI,SAAwB,EAAK,EAAM,CAAC,GAAK,CAAC,UAAQ,SAAO,WAAS,UAAQ,SAAO,UAAQ,QAAM,CAAC,EAAY,EAAQ,EAAQ,IAAQ,EAAgB,EAAW,EAAQ,CAAI,IAAU,EAAQ,OAAc,EAAW,IAAU,EAAQ,IAAW,EAAc,KAAO,CAAC,EAAQ,EAAS,EAAQ,EAAO,CAAQ,EAAC,CAAO,EAAW,EAAa,SAAS,GAAG,EAAa,OAAa,EAAW,EAAyB,EAAK,EAAU,CAAE,EAAC,CAAC,KAAK,OAAO,EAAsB,EAAK,MAAM,CAAC,IAAI,EAAQ,MAAM,CAAC,GAAG,EAAW,GAAG,EAAM,aAAa,CAAO,EAAC,IAAI,MAAO,EAAC,CAAC,CAAY,sBAAkL,AAN1uB,GAA2C,IAA2B,IAAiE,IAA2E,CAAY,AAAC,SAASA,EAAQ,CAA4B,AAA3B,EAAQ,OAAU,SAAS,EAAQ,IAAO,KAAO,EAAY,IAAQ,CAAE,EAAE,CAAO,EAAQ,6BAAmC,EAAW,GAAc,EAA2B,EAAQ,SAAS,IAAI,IAAI,IAAU,E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