{"version":3,"file":"GraphComponent.B-2qnkee.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/LdRAEFwD03Upo9atfv2w/zy9hbHeN5WxtPahlozXT/GraphComponent.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{SLUG_TO_COINGECKO_ID_MAP}from\"https://framerusercontent.com/modules/5cqvr7rFGsBAjc45Txif/9tnAysAS8oE25lZ0O1rS/Constants.js\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function GraphComponent(props){const[ticker,setTicker]=useState(null);useEffect(()=>{const slug=window.location.pathname.split(\"/\").pop();const coingeckoCryptoId=SLUG_TO_COINGECKO_ID_MAP[slug]||null;setTicker(coingeckoCryptoId);},[]);useEffect(()=>{if(!document.querySelector('script[src=\"https://widgets.coingecko.com/gecko-coin-price-chart-widget.js\"]')){const script=document.createElement(\"script\");script.src=\"https://widgets.coingecko.com/gecko-coin-price-chart-widget.js\";script.defer=true;document.head.appendChild(script);return()=>{document.head.removeChild(script);};}},[ticker]);if(!ticker)return null;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"gecko-coin-price-chart-widget\",{locale:\"en\",outlined:\"true\",\"coin-id\":ticker,\"initial-currency\":\"sek\"}),/*#__PURE__*/_jsx(\"style\",{children:`\n                    .framer-6g8fre-container {\n                        width: 100% !important;\n                        max-width: 600px !important;\n                        display: flex;\n                        justify-content: center;\n                        align-items: center;\n                    }\n                    gecko-coin-price-chart-widget {\n                        width: 100% !important;\n                        max-width: none !important;\n                        height: auto !important;\n                    }\n                    @media (max-width: 640px) {\n                        .framer-6g8fre-container {\n                            max-width: 300px !important;\n                            self-algn: center;\n                        }\n                        gecko-coin-price-chart-widget {\n                            width: 100% !important;\n                            max-width: none !important;\n                            height: auto !important;\n                        }\n                    }\n                `})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GraphComponent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"oMAGG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,IAAI,EAAkiB,OAAhiB,MAAc,CAAsD,IAAM,EAAkB,EAAlE,EAAO,SAAS,SAAS,MAAM,GAAG,CAAC,CAAC,IAA0D,IAAI,KAAK,EAAU,CAAiB,CAAE,EAAE,CAAC,CAAC,EAAE,MAAc,CAAC,GAAG,CAAC,SAAS,cAAc,8EAA8E,EAAE,CAAC,IAAM,EAAO,SAAS,cAAc,QAAQ,EAAkI,MAAhI,GAAO,IAAI,iEAAiE,EAAO,MAAM,GAAK,SAAS,KAAK,YAAY,CAAM,MAAY,CAAC,SAAS,KAAK,YAAY,CAAM,CAAE,CAAE,CAAC,EAAE,CAAC,CAAM,CAAC,EAAM,EAAuC,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,gCAAgC,CAAC,OAAO,KAAK,SAAS,OAAO,UAAU,EAAO,mBAAmB,KAAK,CAAC,EAAe,EAAK,QAAQ,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;iBAwBrzB,CAAC,CAAC,CAAC,CAAC,EAxB8lB,IAwB5lB,qBA3BuD,IAAsC,IAAmI"}