{"version":3,"file":"CartOverrides.DBNBiwuM.mjs","names":[],"sources":["https:/framerusercontent.com/modules/4KClRwfnoKFabgvXLSC1/2RjWIAxW37kaowPy7qts/CartOverrides.js"],"sourcesContent":["// CartOverrides.tsx\n// Redesigned to match Kora Peptides brand:\n// #CBFF0F lime badge, black text on lime, Instrument Sans, flat dark aesthetic\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";import{useCartStore,itemCount,openCart,hydrateCart}from\"https://framerusercontent.com/modules/bPtVxsomUQ7gxXA7fgrZ/FRsxhjKHBxRxCx3x5Js3/CartStore.js\";// ─── withCartBadge ────────────────────────────────────────────────────────────\n// Wraps your cart icon and renders a lime #CBFF0F badge showing item count.\n// Apply to: your nav cart/bag icon layer.\n// Badge hides automatically when cart is empty.\nexport const withCartBadge=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useCartStore();const count=itemCount(store);useEffect(()=>{hydrateCart(setStore);},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{position:\"relative\",display:\"inline-flex\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    @import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@600&display=swap');\n                    @keyframes kora-badge-pop {\n                        0% { transform: scale(0); opacity: 0; }\n                        70% { transform: scale(1.15); }\n                        100% { transform: scale(1); opacity: 1; }\n                    }\n                `}),/*#__PURE__*/_jsx(Component,{...props}),count>0&&/*#__PURE__*/_jsx(\"span\",{style:badgeStyle,children:count>99?\"99+\":count})]});});};// ─── withCartToggle ───────────────────────────────────────────────────────────\n// Makes any element open the cart drawer when clicked.\n// Apply to: any layer you want to trigger the cart.\nexport const withCartToggle=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{const[,setStore]=useCartStore();const handleClick=e=>{e.preventDefault();openCart(setStore);props?.onClick?.(e);};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick,style:{cursor:\"pointer\",...props?.style}});});};// ─── withCartBadgeAndToggle ───────────────────────────────────────────────────\n// Convenience: lime badge + click-to-open in one override.\n// This is the one to apply to your nav cart icon.\n//\n// KEY FIX: The outer wrapper div does NOT receive props.style.\n// props (including style) are passed directly to Component so Framer's\n// color, size, and layout context is fully preserved on the icon itself.\nexport const withCartBadgeAndToggle=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useCartStore();const count=itemCount(store);useEffect(()=>{hydrateCart(setStore);},[]);const handleClick=e=>{e.preventDefault();openCart(setStore);props?.onClick?.(e);};return /*#__PURE__*/_jsxs(\"div\",{ref:ref,onClick:handleClick,style:{position:\"relative\",display:\"inline-flex\",cursor:\"pointer\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    @import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@600&display=swap');\n                    @keyframes kora-badge-pop {\n                        0% { transform: scale(0); opacity: 0; }\n                        70% { transform: scale(1.2); }\n                        100% { transform: scale(1); opacity: 1; }\n                    }\n                `}),/*#__PURE__*/_jsx(Component,{...props,onClick:undefined}),count>0&&/*#__PURE__*/_jsx(\"span\",{style:badgeStyle,children:count>99?\"99+\":count})]});});};// ─── withShowWhenCartHasItems ─────────────────────────────────────────────────\n// Hides the wrapped layer when the cart is empty.\n// Apply to: a floating \"View Cart\" button, checkout CTA, or any element\n// that should only appear once something has been added.\nexport const withShowWhenCartHasItems=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{const[store]=useCartStore();const count=itemCount(store);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props?.style,opacity:count>0?1:0,pointerEvents:count>0?\"auto\":\"none\",transition:\"opacity 0.2s ease\"}});});};// ─── Badge style ──────────────────────────────────────────────────────────────\nconst badgeStyle={position:\"absolute\",top:-5,right:-5,minWidth:18,height:18,padding:\"0 5px\",background:\"#D1FF2B\",color:\"#000000\",fontSize:10,fontWeight:600,fontFamily:\"'Instrument Sans', sans-serif\",borderRadius:999,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",lineHeight:1,pointerEvents:\"none\",letterSpacing:\"0.02em\",animation:\"kora-badge-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1)\"};\nexport const __FramerMetadata__ = {\"exports\":{\"withCartToggle\":{\"type\":\"reactHoc\",\"name\":\"withCartToggle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCartBadge\":{\"type\":\"reactHoc\",\"name\":\"withCartBadge\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShowWhenCartHasItems\":{\"type\":\"reactHoc\",\"name\":\"withShowWhenCartHasItems\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCartBadgeAndToggle\":{\"type\":\"reactHoc\",\"name\":\"withCartBadgeAndToggle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"4NAGyD,IAAwC,IAAsJ,CAc1O,EAAe,GAAgC,GAAY,EAAM,IAAM,CAAC,GAAK,EAAE,GAAU,GAAc,CAAO,EAAY,GAAG,CAAC,EAAE,gBAAgB,CAAC,EAAS,EAAS,CAAC,GAAO,UAAU,EAAE,EAAG,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,QAAQ,EAAY,MAAM,CAAC,OAAO,UAAU,GAAG,GAAO,MAAM,CAAC,CAAC,EAAG,CAOhT,EAAuB,GAAgC,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAM,GAAU,GAAc,CAAO,EAAM,EAAU,EAAM,CAA8H,OAA7H,MAAc,CAAC,EAAY,EAAS,EAAG,EAAE,CAAC,CAAuG,EAAM,MAAM,CAAK,MAAI,QAAzG,GAAG,CAAC,EAAE,gBAAgB,CAAC,EAAS,EAAS,CAAC,GAAO,UAAU,EAAE,EAAgE,MAAM,CAAC,SAAS,WAAW,QAAQ,cAAc,OAAO,UAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS;;;;;;;kBAOxb,CAAC,CAAc,EAAK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