{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/IQXqjAGXltPKLdfjcdtf/lAGTSWXHOURZHTDuJEPt/Logo.js"],
  "sourcesContent": ["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { addPropertyControls, ControlType, RenderTarget } from \"framer\";\nimport { NullState } from \"https://framer.com/m/framer/icon-nullstate.js@0.7.0\";\nvar SrcType;\n(function (SrcType) {\n  SrcType[\"Upload\"] = \"Upload\";\n  SrcType[\"Url\"] = \"URL\";\n})(SrcType || (SrcType = {}));\nconst baseUrl = \"https://logo.clearbit.com/\";\nconst getLogoUrl = company => {\n  if (!company) return null;\n  return company.includes(\".\") ? `${baseUrl}${company}?size=500` : `${baseUrl}${company}.com?size=500`;\n}; /**\n   * @framerIntrinsicWidth 64\n   * @framerIntrinsicHeight 64\n   *\n   * @framerSupportedLayoutWidth fixed\n   * @framerSupportedLayoutHeight fixed\n   */\nexport default function Logo(props) {\n  const {\n    company,\n    radius,\n    isSearch,\n    srcType,\n    srcUrl,\n    srcFile,\n    style\n  } = props;\n  const logoURL = useMemo(() => {\n    if (isSearch) return getLogoUrl(company);\n    if (srcType === SrcType.Upload) return srcFile;\n    if (srcType === SrcType.Url) return srcUrl;\n    return null;\n  }, [company, isSearch, srcType, srcUrl, srcFile]);\n  const isOnCanvas = RenderTarget.current() === RenderTarget.canvas;\n  const emptyState = isOnCanvas ? /*#__PURE__*/_jsx(NullState, {}) : null;\n  return logoURL ? /*#__PURE__*/_jsx(\"img\", {\n    src: logoURL,\n    style: {\n      ...baseStyles,\n      ...style,\n      borderRadius: radius\n    }\n  }) : emptyState;\n}\n;\nLogo.defaultProps = {\n  company: \"Framer\",\n  radius: 100,\n  width: 64,\n  height: 64,\n  isSearch: true\n};\nconst baseStyles = {\n  position: \"absolute\",\n  left: 0,\n  right: 0,\n  top: 0,\n  bottom: 0,\n  width: \"100%\",\n  height: \"100%\"\n};\naddPropertyControls(Logo, {\n  isSearch: {\n    type: ControlType.Boolean,\n    title: \"Type\",\n    disabledTitle: \"Custom\",\n    enabledTitle: \"Search\"\n  },\n  srcType: {\n    type: ControlType.Enum,\n    displaySegmentedControl: true,\n    title: \"Source\",\n    options: [SrcType.Url, SrcType.Upload],\n    hidden: ({\n      isSearch\n    }) => isSearch\n  },\n  srcUrl: {\n    type: ControlType.String,\n    title: \" \",\n    placeholder: \"../example.jpg\",\n    hidden: ({\n      srcType,\n      isSearch\n    }) => srcType === SrcType.Upload || isSearch\n  },\n  srcFile: {\n    type: ControlType.File,\n    title: \" \",\n    allowedFileTypes: [\"jpg\", \"png\", \"jpeg\", \"tiff\", \"gif\"],\n    hidden: ({\n      srcType,\n      isSearch\n    }) => srcType === SrcType.Url || isSearch\n  },\n  company: {\n    type: ControlType.String,\n    title: \"Company\",\n    placeholder: \"Github, Apple...\",\n    hidden: ({\n      isSearch\n    }) => !isSearch\n  },\n  radius: {\n    type: ControlType.Number,\n    min: 0,\n    max: 100,\n    title: \"Radius\"\n  }\n});\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"default\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"Logo\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerContractVersion\": \"1\",\n        \"framerIntrinsicHeight\": \"64\",\n        \"framerIntrinsicWidth\": \"64\",\n        \"framerSupportedLayoutWidth\": \"fixed\",\n        \"framerSupportedLayoutHeight\": \"fixed\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./Logo.map"],
  "mappings": "gJAIA,IAAIA,GACH,SAAUA,EAAS,CAClBA,EAAQ,OAAY,SACpBA,EAAQ,IAAS,KACnB,GAAGA,IAAYA,EAAU,CAAC,EAAE,EAC5B,IAAMC,EAAU,6BACVC,EAAaC,GACZA,EACEA,EAAQ,SAAS,GAAG,EAAI,GAAGF,IAAUE,aAAqB,GAAGF,IAAUE,iBADzD,KASR,SAARC,EAAsBC,EAAO,CAClC,G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EAAY,OAClB,MAAO,UACP,YAAa,mBACb,OAAQ,CAAC,CACP,SAAAb,CACF,IAAM,CAACA,CACT,EACA,OAAQ,CACN,KAAMa,EAAY,OAClB,IAAK,EACL,IAAK,IACL,MAAO,QACT,CACF,CAAC",
  "names": ["SrcType", "baseUrl", "getLogoUrl", "company", "Logo", "props", "radius", "isSearch", "srcType", "srcUrl", "srcFile", "style", "logoURL", "se", "emptyState", "RenderTarget", "p", "NullState", "baseStyles", "addPropertyControls", "ControlType"]
}
