{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/0xkiWjwekn87OErRIyqu/zfo3xl5jaPWxAsipkiDA/BuyNowButton.js", "ssg:https://framerusercontent.com/modules/VZYtjCvvtLmQOfIRns5b/iRzQYjbo38GXZPPGx7I6/LGBc9z4CS.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{ControlType,RenderTarget}from\"framer\";import{generateBuyNowCheckoutUrl,useAmountInStock}from\"https://framerusercontent.com/modules/ibjYTPLnMMPhPLNCj4uG/cXa4uUn5VWWAcoaQctVU/Cart.js\";import{useProductStore,useSelectedVariant}from\"https://framerusercontent.com/modules/ajKYBgRXgNyNgL1GkpqG/prknJU66nI5iRE43ff6z/ProductState.js\";import{parseShopifyData,addPropertyControlsFrameship}from\"https://framerusercontent.com/modules/gd3dcT3w5rYoRy7ZcKte/sH6FZizM8jJ11j2dQOhQ/Shared.js\";import{Button,createButtonPropertyControls,Colors}from\"https://framerusercontent.com/modules/fVHxdMMgjEun6wSmFoH5/YkzDT1nJkSVbzIk0LJ2h/SharedStyles.js\";var State;(function(State){State[\"Default\"]=\"default\";State[\"OutOfStock\"]=\"outOfStock\";})(State||(State={}));const defaultText={[\"default\"]:\"Buy Now\",[\"outOfStock\"]:\"Buy Now\"};/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 300\n * @framerDisableUnlink\n */export default function BuyNowButton(props){const{newTab,layer}=props;const{shopifyId,tracksInventory}=parseShopifyData(props.shopifyData);const isCanvas=RenderTarget.current()===RenderTarget.canvas;const{quantity,selectedVariantOptions}=useProductStore(state=>state.products?.[shopifyId]||{quantity:1,selectedVariantOptions:{}});const selectedVariant=useSelectedVariant(props.shopifyData);const[inventory,inventoryIsLoading]=useAmountInStock(props.shopifyData);const state=isCanvas||!tracksInventory||inventory[selectedVariant?.id]>0||inventoryIsLoading?\"default\":\"outOfStock\";const onClick=()=>{if(selectedVariant){const windowReference=newTab?window.open():null;generateBuyNowCheckoutUrl(selectedVariant.id,quantity).then(checkoutUrl=>{if(newTab){windowReference.location=checkoutUrl;}else{window.location.href=checkoutUrl;}}).catch(console.error);}};return /*#__PURE__*/_jsx(Button,{...props,onClick:onClick,variant:state,style:{cursor:state===\"default\"?\"pointer\":undefined,userSelect:\"none\",...props.style},children:props.text[state]});}BuyNowButton.displayName=\"Buy Now Button\";addPropertyControlsFrameship(BuyNowButton,{newTab:{type:ControlType.Boolean,defaultValue:true,description:\"Open checkout in new tab\"},text:{type:ControlType.Object,defaultValue:defaultText,controls:{[\"default\"]:{type:ControlType.String,defaultValue:defaultText[\"default\"],placeholder:\"Default Text\"},[\"outOfStock\"]:{type:ControlType.String,defaultValue:defaultText[\"outOfStock\"],placeholder:\"Out of Stock Text\",title:\"Out of Stock\"}}},...createButtonPropertyControls({opacity:true,variants:[{id:\"default\",title:\"Default\",...Colors.Primary,opacity:1},{id:\"outOfStock\",title:\"Out of Stock\",opacity:.5}]})},{shopifyData:true});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BuyNowButton\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any\",\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BuyNowButton.map", "// Generated by Framer (4d21961)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Geist-500\",\"GF;Geist-700\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Geist\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/geist/v1/gyBhhwUxId8gMGYQMKR3pzfaWI_RruM4mJPby1QNtA.woff2\",weight:\"500\"},{family:\"Geist\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/geist/v1/gyBhhwUxId8gMGYQMKR3pzfaWI_Re-Q4mJPby1QNtA.woff2\",weight:\"700\"}]}];export const css=['.framer-NEGIy .framer-styles-preset-tbg1hy:not(.rich-text-wrapper), .framer-NEGIy .framer-styles-preset-tbg1hy.rich-text-wrapper h5 { --framer-font-family: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-family-bold: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 26px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 500; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 1.2em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: var(--token-6d35db16-1dd5-47d7-b407-5017627f90c5, #111111); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }','@media (max-width: 1239px) and (min-width: 768px) { .framer-NEGIy .framer-styles-preset-tbg1hy:not(.rich-text-wrapper), .framer-NEGIy .framer-styles-preset-tbg1hy.rich-text-wrapper h5 { --framer-font-family: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-family-bold: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 22px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 500; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 1.2em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: var(--token-6d35db16-1dd5-47d7-b407-5017627f90c5, #111111); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }','@media (max-width: 767px) and (min-width: 0px) { .framer-NEGIy .framer-styles-preset-tbg1hy:not(.rich-text-wrapper), .framer-NEGIy .framer-styles-preset-tbg1hy.rich-text-wrapper h5 { --framer-font-family: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-family-bold: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 20px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 500; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 1.2em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: var(--token-6d35db16-1dd5-47d7-b407-5017627f90c5, #111111); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }'];export const className=\"framer-NEGIy\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "6OAAqqB,IAAIA,GAAO,SAASA,EAAM,CAACA,EAAM,QAAW,UAAUA,EAAM,WAAc,YAAa,GAAGA,IAAQA,EAAM,CAAC,EAAE,EAAE,IAAMC,EAAY,CAAE,QAAW,UAAW,WAAc,SAAS,EAKj0B,SAARC,EAA8BC,EAAM,CAAC,GAAK,CAAC,OAAAC,EAAO,MAAAC,CAAK,EAAEF,EAAW,CAAC,UAAAG,EAAU,gBAAAC,CAAe,EAAEC,EAAiBL,EAAM,WAAW,EAAQM,EAASC,EAAa,QAAQ,IAAIA,EAAa,OAAY,CAAC,SAAAC,EAAS,uBAAAC,CAAsB,EAAEC,EAAgBC,GAAOA,EAAM,WAAWR,CAAS,GAAG,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC,EAAQS,EAAgBC,EAAmBb,EAAM,WAAW,EAAO,CAACc,EAAUC,CAAkB,EAAEC,EAAiBhB,EAAM,WAAW,EAAQW,EAAML,GAAU,CAACF,GAAiBU,EAAUF,GAAiB,EAAE,EAAE,GAAGG,EAAmB,UAAU,aAAiS,OAAoBE,EA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AAC,CAAC,CAAC,EAAeC,EAAI,CAAC,00BAA00B,g4BAAg4B,43BAA43B,EAAeC,EAAU",
  "names": ["State", "defaultText", "BuyNowButton", "props", "newTab", "layer", "shopifyId", "tracksInventory", "parseShopifyData", "isCanvas", "RenderTarget", "quantity", "selectedVariantOptions", "useProductStore", "state", "selectedVariant", "useSelectedVariant", "inventory", "inventoryIsLoading", "useAmountInStock", "p", "Button", "windowReference", "window", "generateBuyNowCheckoutUrl", "checkoutUrl", "addPropertyControlsFrameship", "ControlType", "createButtonPropertyControls", "Colors", "fontStore", "fonts", "css", "className"]
}
