{"version":3,"file":"MagicKit_Cart_Control.DDkd8Pf5.mjs","names":["useState","useCallback"],"sources":["https:/framerusercontent.com/modules/rpDofwyxUiVkrUhuWLHJ/Qp47vG2udCVEtM5QbdJQ/MagicKit_ShopifyCart.js","https:/framerusercontent.com/modules/2dk0KjX9CUPDMeO83gud/N9MmdQGKWt1MLwC6YAfp/MagicKit_Cart_Control.js"],"sourcesContent":["// User request: Create ONE new code file named MagicKit_ShopifyCart.ts. Do not modify any existing files, including Sellflow_kcnpk.tsx and all MagicKit UI components. This must be a read/write service module only: no React components, no JSX, no UI, no styles.\n/**\n * Central Shopify Storefront cart/data service for MagicKit.\n * Uses the existing Sellflow connection settings and persists only Shopify cart id.\n */const SHOPIFY_STORE_DOMAIN=\"jqa1k9-a6.myshopify.com\";const SHOPIFY_STOREFRONT_TOKEN=\"23eafbd0c129a659203c6ec472eabe00\";const SHOPIFY_API_VERSION=\"2024-10\";const SHOPIFY_CART_ID_STORAGE_KEY=\"magickit_shopify_cart_id\";const MAGIC_KIT_CART_UPDATED_EVENT=\"magickit-cart-updated\";const SHOPIFY_ENDPOINT=`https://${SHOPIFY_STORE_DOMAIN}/api/${SHOPIFY_API_VERSION}/graphql.json`;function canUseWindow(){return typeof window!==\"undefined\";}function readUserErrors(userErrors){if(!Array.isArray(userErrors))return[];return userErrors.map(error=>error?.message||\"Ok\\xe4nt Shopify-fel\").filter(Boolean);}async function shopifyGraphQL(query,variables){const response=await fetch(SHOPIFY_ENDPOINT,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",\"X-Shopify-Storefront-Access-Token\":SHOPIFY_STOREFRONT_TOKEN},body:JSON.stringify({query,variables})});if(!response.ok){throw new Error(`Shopify API-fel (${response.status})`);}const json=await response.json();if(Array.isArray(json.errors)&&json.errors.length>0){throw new Error(json.errors.map(item=>item?.message||\"GraphQL-fel\").join(\", \"));}if(!json.data){throw new Error(\"Tomt svar fr\\xe5n Shopify API\");}return json.data;}export function normalizeShopifyIdentifier(input){return String(input||\"\").normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g,\"\").toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-+|-+$/g,\"\");}function normalizeCompact(input){return normalizeShopifyIdentifier(input).replace(/-/g,\"\");}function mapProduct(raw){const variants=(raw?.variants?.edges||[]).map(edge=>{const node=edge?.node||{};return{id:String(node.id||\"\"),title:String(node.title||\"\"),availableForSale:Boolean(node.availableForSale),price:{amount:String(node?.price?.amount||\"0\"),currencyCode:String(node?.price?.currencyCode||\"SEK\")}};});return{id:String(raw?.id||\"\"),title:String(raw?.title||\"\"),handle:String(raw?.handle||\"\"),featuredImage:raw?.featuredImage?{url:String(raw.featuredImage.url||\"\"),altText:raw.featuredImage.altText||null}:null,priceRange:raw?.priceRange?.minVariantPrice?{minVariantPrice:{amount:String(raw.priceRange.minVariantPrice.amount||\"0\"),currencyCode:String(raw.priceRange.minVariantPrice.currencyCode||\"SEK\")}}:undefined,variants};}function mapCart(raw){const subtotalCurrency=raw?.cost?.subtotalAmount?.currencyCode||raw?.lines?.edges?.[0]?.node?.merchandise?.price?.currencyCode||\"SEK\";return{id:String(raw?.id||\"\"),checkoutUrl:String(raw?.checkoutUrl||\"\"),totalQuantity:Math.max(0,Number(raw?.totalQuantity||0)),subtotalAmount:{amount:String(raw?.cost?.subtotalAmount?.amount||\"0\"),currencyCode:String(subtotalCurrency)},lines:(raw?.lines?.edges||[]).map(edge=>{const node=edge?.node||{};return{id:String(node.id||\"\"),quantity:Math.max(0,Number(node.quantity||0)),attributes:Array.isArray(node.attributes)?node.attributes.map(attr=>({key:String(attr?.key||\"\"),value:String(attr?.value||\"\")})):[],merchandise:{id:String(node?.merchandise?.id||\"\"),title:String(node?.merchandise?.title||\"\"),product:{id:String(node?.merchandise?.product?.id||\"\"),title:String(node?.merchandise?.product?.title||\"\"),handle:String(node?.merchandise?.product?.handle||\"\"),featuredImage:node?.merchandise?.product?.featuredImage?{url:String(node.merchandise.product.featuredImage.url||\"\"),altText:node.merchandise.product.featuredImage.altText||null}:null},price:{amount:String(node?.merchandise?.price?.amount||\"0\"),currencyCode:String(node?.merchandise?.price?.currencyCode||\"SEK\")}}};})};}export async function getShopifyProductByHandle(handle){const safeHandle=String(handle||\"\").trim();if(!safeHandle)return null;const data=await shopifyGraphQL(`\n        query GetProductByHandle($handle: String!) {\n            productByHandle(handle: $handle) {\n                id\n                title\n                handle\n                featuredImage {\n                    url\n                    altText\n                }\n                priceRange {\n                    minVariantPrice {\n                        amount\n                        currencyCode\n                    }\n                }\n                variants(first: 100) {\n                    edges {\n                        node {\n                            id\n                            title\n                            availableForSale\n                            price {\n                                amount\n                                currencyCode\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        `,{handle:safeHandle});if(!data.productByHandle)return null;return mapProduct(data.productByHandle);}export async function getShopifyVariants(handle){const product=await getShopifyProductByHandle(handle);if(!product)return[];return product.variants.filter(variant=>variant.availableForSale);}export async function resolveShopifySellableVariant(productIdentifier){const rawIdentifier=String(productIdentifier||\"\").trim();const normalized=normalizeShopifyIdentifier(rawIdentifier);const compact=normalizeCompact(rawIdentifier);const handleCandidates=Array.from(new Set([rawIdentifier,normalized,compact,normalized.replace(/-/g,\"\")].map(value=>String(value||\"\").trim()).filter(Boolean)));for(const candidate of handleCandidates){const product=await getShopifyProductByHandle(candidate);const variant=product?.variants.find(v=>v.availableForSale);if(product&&variant)return{product,variant};}const data=await shopifyGraphQL(`\n        query SearchProducts($query: String!) {\n            products(first: 20, query: $query) {\n                edges {\n                    node {\n                        id\n                        title\n                        handle\n                        featuredImage {\n                            url\n                            altText\n                        }\n                        priceRange {\n                            minVariantPrice {\n                                amount\n                                currencyCode\n                            }\n                        }\n                        variants(first: 50) {\n                            edges {\n                                node {\n                                    id\n                                    title\n                                    availableForSale\n                                    price {\n                                        amount\n                                        currencyCode\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        `,{query:rawIdentifier||normalized||compact});const products=(data.products?.edges||[]).map(edge=>mapProduct(edge?.node)).filter(product=>!!product?.id);const best=products.find(product=>{const handleCompact=normalizeCompact(product.handle);const titleCompact=normalizeCompact(product.title);return handleCandidates.some(candidate=>{const candidateCompact=normalizeCompact(candidate);return handleCompact===candidateCompact||titleCompact===candidateCompact||handleCompact.includes(candidateCompact)||titleCompact.includes(candidateCompact);});});const fallback=best||products[0];if(!fallback)return null;const variant=fallback.variants.find(v=>v.availableForSale);if(!variant)return null;return{product:fallback,variant};}export function getPersistedShopifyCartId(){if(!canUseWindow())return null;const value=window.localStorage.getItem(SHOPIFY_CART_ID_STORAGE_KEY);return value&&value.trim().length>0?value:null;}export function setPersistedShopifyCartId(cartId){if(!canUseWindow())return;const safeCartId=String(cartId||\"\").trim();if(!safeCartId)return;window.localStorage.setItem(SHOPIFY_CART_ID_STORAGE_KEY,safeCartId);}export function clearPersistedShopifyCartId(){if(!canUseWindow())return;window.localStorage.removeItem(SHOPIFY_CART_ID_STORAGE_KEY);}export async function getShopifyCart(){const cartId=getPersistedShopifyCartId();if(!cartId)return null;const data=await shopifyGraphQL(`\n        query GetCart($cartId: ID!) {\n            cart(id: $cartId) {\n                id\n                checkoutUrl\n                totalQuantity\n                cost {\n                    subtotalAmount {\n                        amount\n                        currencyCode\n                    }\n                }\n                lines(first: 100) {\n                    edges {\n                        node {\n                            id\n                            quantity\n                            attributes {\n                                key\n                                value\n                            }\n                            merchandise {\n                                ... on ProductVariant {\n                                    id\n                                    title\n                                    price {\n                                        amount\n                                        currencyCode\n                                    }\n                                    product {\n                                        id\n                                        title\n                                        handle\n                                        featuredImage {\n                                            url\n                                            altText\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        `,{cartId});if(!data.cart){clearPersistedShopifyCartId();return null;}return mapCart(data.cart);}export async function createShopifyCart(lines){const data=await shopifyGraphQL(`\n        mutation CreateCart($lines: [CartLineInput!]!) {\n            cartCreate(input: { lines: $lines }) {\n                cart {\n                    id\n                    checkoutUrl\n                    totalQuantity\n                    cost {\n                        subtotalAmount {\n                            amount\n                            currencyCode\n                        }\n                    }\n                    lines(first: 100) {\n                        edges {\n                            node {\n                                id\n                                quantity\n                                attributes {\n                                    key\n                                    value\n                                }\n                                merchandise {\n                                    ... on ProductVariant {\n                                        id\n                                        title\n                                        price {\n                                            amount\n                                            currencyCode\n                                        }\n                                        product {\n                                            id\n                                            title\n                                            handle\n                                            featuredImage {\n                                                url\n                                                altText\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                userErrors {\n                    message\n                }\n            }\n        }\n        `,{lines});const userErrorMessages=readUserErrors(data.cartCreate?.userErrors);if(userErrorMessages.length>0){throw new Error(userErrorMessages.join(\", \"));}if(!data.cartCreate?.cart?.id){throw new Error(\"Kunde inte skapa Shopify-kundvagn\");}const mapped=mapCart(data.cartCreate.cart);setPersistedShopifyCartId(mapped.id);return mapped;}export async function addShopifyCartLines(lines){const persistedCartId=getPersistedShopifyCartId();if(!persistedCartId){return createShopifyCart(lines);}try{const data=await shopifyGraphQL(`\n            mutation AddCartLines($cartId: ID!, $lines: [CartLineInput!]!) {\n                cartLinesAdd(cartId: $cartId, lines: $lines) {\n                    cart {\n                        id\n                        checkoutUrl\n                        totalQuantity\n                        cost {\n                            subtotalAmount {\n                                amount\n                                currencyCode\n                            }\n                        }\n                        lines(first: 100) {\n                            edges {\n                                node {\n                                    id\n                                    quantity\n                                    attributes {\n                                        key\n                                        value\n                                    }\n                                    merchandise {\n                                        ... on ProductVariant {\n                                            id\n                                            title\n                                            price {\n                                                amount\n                                                currencyCode\n                                            }\n                                            product {\n                                                id\n                                                title\n                                                handle\n                                                featuredImage {\n                                                    url\n                                                    altText\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                    userErrors {\n                        message\n                    }\n                }\n            }\n            `,{cartId:persistedCartId,lines});const userErrorMessages=readUserErrors(data.cartLinesAdd?.userErrors);if(userErrorMessages.length>0||!data.cartLinesAdd?.cart?.id){clearPersistedShopifyCartId();return createShopifyCart(lines);}const mapped=mapCart(data.cartLinesAdd.cart);setPersistedShopifyCartId(mapped.id);return mapped;}catch(_error){clearPersistedShopifyCartId();return createShopifyCart(lines);}}export async function updateShopifyCartLines(lines){const cartId=getPersistedShopifyCartId();if(!cartId)return null;const data=await shopifyGraphQL(`\n        mutation UpdateCartLines($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n            cartLinesUpdate(cartId: $cartId, lines: $lines) {\n                cart {\n                    id\n                    checkoutUrl\n                    totalQuantity\n                    cost {\n                        subtotalAmount {\n                            amount\n                            currencyCode\n                        }\n                    }\n                    lines(first: 100) {\n                        edges {\n                            node {\n                                id\n                                quantity\n                                attributes {\n                                    key\n                                    value\n                                }\n                                merchandise {\n                                    ... on ProductVariant {\n                                        id\n                                        title\n                                        price {\n                                            amount\n                                            currencyCode\n                                        }\n                                        product {\n                                            id\n                                            title\n                                            handle\n                                            featuredImage {\n                                                url\n                                                altText\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                userErrors {\n                    message\n                }\n            }\n        }\n        `,{cartId,lines});const userErrorMessages=readUserErrors(data.cartLinesUpdate?.userErrors);if(userErrorMessages.length>0){throw new Error(userErrorMessages.join(\", \"));}if(!data.cartLinesUpdate?.cart){clearPersistedShopifyCartId();return null;}const mapped=mapCart(data.cartLinesUpdate.cart);setPersistedShopifyCartId(mapped.id);return mapped;}export async function removeShopifyCartLines(lineIds){const cartId=getPersistedShopifyCartId();if(!cartId)return null;const data=await shopifyGraphQL(`\n        mutation RemoveCartLines($cartId: ID!, $lineIds: [ID!]!) {\n            cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n                cart {\n                    id\n                    checkoutUrl\n                    totalQuantity\n                    cost {\n                        subtotalAmount {\n                            amount\n                            currencyCode\n                        }\n                    }\n                    lines(first: 100) {\n                        edges {\n                            node {\n                                id\n                                quantity\n                                attributes {\n                                    key\n                                    value\n                                }\n                                merchandise {\n                                    ... on ProductVariant {\n                                        id\n                                        title\n                                        price {\n                                            amount\n                                            currencyCode\n                                        }\n                                        product {\n                                            id\n                                            title\n                                            handle\n                                            featuredImage {\n                                                url\n                                                altText\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                userErrors {\n                    message\n                }\n            }\n        }\n        `,{cartId,lineIds});const userErrorMessages=readUserErrors(data.cartLinesRemove?.userErrors);if(userErrorMessages.length>0){throw new Error(userErrorMessages.join(\", \"));}if(!data.cartLinesRemove?.cart){clearPersistedShopifyCartId();return null;}const mapped=mapCart(data.cartLinesRemove.cart);setPersistedShopifyCartId(mapped.id);return mapped;}export async function getShopifyCheckoutUrl(){const cart=await getShopifyCart();return cart?.checkoutUrl||\"\";}export function dispatchMagicKitCartUpdated(){if(!canUseWindow())return;window.dispatchEvent(new CustomEvent(MAGIC_KIT_CART_UPDATED_EVENT));}export default function MagicKitShopifyCartService(){return null;}\nexport const __FramerMetadata__ = {\"exports\":{\"updateShopifyCartLines\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyMoney\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getShopifyCart\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createShopifyCart\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyCartLine\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getShopifyProductByHandle\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"resolveShopifySellableVariant\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyVariant\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyCartLineInput\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyProduct\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getPersistedShopifyCartId\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyCart\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"normalizeShopifyIdentifier\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addShopifyCartLines\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getShopifyVariants\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyAttribute\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setPersistedShopifyCartId\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getShopifyCheckoutUrl\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"dispatchMagicKitCartUpdated\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"clearPersistedShopifyCartId\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyImage\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"removeShopifyCartLines\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopifyCartLineUpdateInput\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MagicKit_ShopifyCart.map","// User request: Create a new Framer code component named MagicKit Cart Control that supports a persistent shared cart across component instances using browser storage and a custom browser event. It must expose controls: mode (\"add\" or \"cart\"), productId, accentColor, labelColor, size, and showLabel. In add mode, render a compact circular pink plus button that increments the specified product quantity on click, prevents click propagation so it does not activate a card link, and is keyboard accessible. In cart mode, render a small shopping-cart icon with a readable count badge that immediately reacts when any add control is clicked and persists after reload. Keep the visual output clean and minimal to match a playful kids e-commerce storefront, but make colors/sizing editable through controls. Do not use external dependencies. Return both modes from one component; it will be inserted into existing native card and header layouts.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{startTransition,useCallback,useEffect,useState}from\"react\";import{addShopifyCartLines,getShopifyCart,dispatchMagicKitCartUpdated,resolveShopifySellableVariant}from\"https://framerusercontent.com/modules/rpDofwyxUiVkrUhuWLHJ/Qp47vG2udCVEtM5QbdJQ/MagicKit_ShopifyCart.js\";const STORAGE_KEY=\"magickit_shared_cart_v1\";const EVENT_NAME=\"magickit-cart-updated\";function createFallbackProductName(productId){return productId.replace(/[-_]+/g,\" \").trim().replace(/\\b\\w/g,char=>char.toUpperCase());}function normalizeCartData(raw){if(raw&&typeof raw===\"object\"&&\"version\"in raw&&\"items\"in raw){const typed=raw;if(typed.version===2&&Array.isArray(typed.items)){const items=typed.items.map(item=>{const value=item;const productId=typeof value.productId===\"string\"?value.productId:\"\";if(!productId)return null;const optionId=typeof value.optionId===\"string\"?value.optionId:\"default\";const quantity=Math.max(0,Math.round(Number(value.quantity)||0));if(quantity<=0)return null;return{id:typeof value.id===\"string\"&&value.id?value.id:`${productId}::${optionId}`,productId,productName:typeof value.productName===\"string\"&&value.productName?value.productName:createFallbackProductName(productId),optionId,optionLabel:typeof value.optionLabel===\"string\"&&value.optionLabel?value.optionLabel:\"Standard\",unitPrice:Math.max(0,Number(value.unitPrice)||0),quantity};}).filter(item=>item!==null);return{version:2,items};}}const legacy=raw;if(legacy&&typeof legacy===\"object\"){const items=Object.entries(legacy).map(([productId,count])=>{const quantity=Math.max(0,Math.round(Number(count)||0));if(!productId||quantity<=0)return null;return{id:`${productId}::default`,productId,productName:createFallbackProductName(productId),optionId:\"default\",optionLabel:\"Standard\",unitPrice:0,quantity};}).filter(item=>item!==null);return{version:2,items};}return{version:2,items:[]};}function readCartFromStorage(){if(typeof window===\"undefined\")return{version:2,items:[]};try{const raw=window.localStorage.getItem(STORAGE_KEY);if(!raw)return{version:2,items:[]};const parsed=JSON.parse(raw);const normalized=normalizeCartData(parsed);if(!(parsed&&typeof parsed===\"object\"&&\"version\"in parsed)){window.localStorage.setItem(STORAGE_KEY,JSON.stringify(normalized));}return normalized;}catch(error){return{version:2,items:[]};}}function writeCartToStorage(cart){if(typeof window===\"undefined\")return;try{window.localStorage.setItem(STORAGE_KEY,JSON.stringify(cart));}catch(error){// no-op: storage may be blocked\n}}function getTotalCount(cart){return cart.items.reduce((sum,item)=>sum+Math.max(0,item.quantity||0),0);}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function MagicKitCartControl(props){const{mode=\"add\",productId=\"product-1\",accentColor=\"#FF4FA3\",labelColor=\"#000000\",size=32,showLabel=false}=props;const[totalCount,setTotalCount]=useState(0);const syncFromStorage=useCallback(async()=>{try{const shopifyCart=await getShopifyCart();const count=Math.max(0,Number(shopifyCart?.totalQuantity||0));startTransition(()=>{setTotalCount(count);});}catch(error){const fallbackCount=getTotalCount(readCartFromStorage());startTransition(()=>{setTotalCount(fallbackCount);});}},[]);useEffect(()=>{if(typeof window===\"undefined\")return;const handleCustomEvent=()=>{void syncFromStorage();};const handleStorageEvent=event=>{if(event.key===STORAGE_KEY||event.key===\"magickit_shopify_cart_id\"){void syncFromStorage();}};window.addEventListener(EVENT_NAME,handleCustomEvent);window.addEventListener(\"storage\",handleStorageEvent);return()=>{window.removeEventListener(EVENT_NAME,handleCustomEvent);window.removeEventListener(\"storage\",handleStorageEvent);};void syncFromStorage();},[syncFromStorage]);const addItem=useCallback(async()=>{if(typeof window===\"undefined\"||!productId)return;const resolved=await resolveShopifySellableVariant(productId);if(!resolved?.variant?.id)return;try{const shopifyCart=await addShopifyCartLines([{merchandiseId:resolved.variant.id,quantity:1,attributes:[{key:\"Magickit ProductId\",value:productId}]}]);startTransition(()=>{setTotalCount(Math.max(0,Number(shopifyCart.totalQuantity||0)));});}catch(error){startTransition(()=>{setTotalCount(getTotalCount(readCartFromStorage()));});}dispatchMagicKitCartUpdated();window.dispatchEvent(new CustomEvent(EVENT_NAME));},[productId,dispatchMagicKitCartUpdated]);const stopCardNavigation=useCallback(event=>{event.preventDefault();event.stopPropagation();},[]);const onAddClick=useCallback(event=>{stopCardNavigation(event);addItem();},[addItem,stopCardNavigation]);const onKeyDown=useCallback(event=>{event.stopPropagation();if(event.key===\"Enter\"||event.key===\" \"){event.preventDefault();addItem();}},[addItem]);const onCartClick=useCallback(event=>{const parentLink=event.currentTarget.closest(\"a[href]\");if(parentLink)return;if(typeof window!==\"undefined\"){window.location.href=\"/page/cart\";}},[]);const safeSize=Math.max(20,size||32);const badgeSize=Math.max(16,safeSize*.52);const iconSize=safeSize*.58;if(mode===\"add\"){return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",display:\"inline-flex\",alignItems:\"center\",gap:8,width:\"max-content\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:onAddClick,onKeyDown:onKeyDown,\"aria-label\":\"Add item to cart\",style:{width:safeSize,height:safeSize,borderRadius:\"999px\",border:\"none\",background:accentColor,color:\"#FFFFFF\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:Math.max(14,safeSize*.65),lineHeight:1,fontWeight:700,cursor:\"pointer\",padding:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.12)\"},children:\"+\"}),showLabel?/*#__PURE__*/_jsx(\"span\",{style:{color:labelColor,fontSize:Math.max(12,safeSize*.38),lineHeight:1.2,fontWeight:600,minWidth:\"max-content\"},children:\"Add\"}):null]});}return /*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:onCartClick,\"aria-label\":\"Open cart\",style:{position:\"relative\",display:\"inline-flex\",alignItems:\"center\",gap:8,width:\"max-content\",color:labelColor,border:\"none\",background:\"transparent\",cursor:\"pointer\",padding:0},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:safeSize,height:safeSize,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",fill:\"none\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M3 5h2l2.1 9.2a2 2 0 0 0 2 1.6h7.8a2 2 0 0 0 2-1.6L21 8H7\",stroke:accentColor,strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"circle\",{cx:\"10\",cy:\"19\",r:\"1.5\",fill:accentColor}),/*#__PURE__*/_jsx(\"circle\",{cx:\"17\",cy:\"19\",r:\"1.5\",fill:accentColor})]}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:-2,right:-2,minWidth:badgeSize,height:badgeSize,borderRadius:\"999px\",background:accentColor,color:\"#FFFFFF\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"0 5px\",fontSize:Math.max(10,safeSize*.28),fontWeight:700,lineHeight:1},children:totalCount})]}),showLabel?/*#__PURE__*/_jsx(\"span\",{style:{color:labelColor,fontSize:Math.max(12,safeSize*.38),lineHeight:1.2,fontWeight:600,minWidth:\"max-content\"},children:\"Cart\"}):null]});}addPropertyControls(MagicKitCartControl,{mode:{type:ControlType.Enum,title:\"Mode\",options:[\"add\",\"cart\"],optionTitles:[\"Add\",\"Cart\"],defaultValue:\"add\",displaySegmentedControl:true},productId:{type:ControlType.String,title:\"Product ID\",defaultValue:\"product-1\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#FF4FA3\"},labelColor:{type:ControlType.Color,title:\"Label\",defaultValue:\"#000000\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:32,min:20,max:80,step:1},showLabel:{type:ControlType.Boolean,title:\"Show Label\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MagicKitCartControl\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",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