{"version":3,"file":"AddToCart.CSAJtK-6.mjs","names":["useState","startTransition","_Fragment","useRef","__esmMin","init_ssg_sandbox_shims","te","window","_e","de","init_jsx_runtime","init_npm_react_dom_18_3_1","c","init_npm_react_18_3_1","ce","init_framer_Bf4_tcb2","addPropertyControls","ControlType","useIsStaticRenderer","readPreselect","fromUrl","PRESELECT_PARAM","writePreselect","PRESELECT_KEY","id","readRegisteredServices","w","readCart","parsed","CART_KEY","writeCart","items","CHANGE_EVENT","cartService","i","AddToCart","DEFAULT_DEVICE_SERVICES","DEFAULT_PHONE_SERVICES","DEFAULT_PORTAL","props","portal","portalUrl","isStatic","justAdded","setJustAdded","hover","setHover","serviceId","setServiceId","services","setServices","notice","setNotice","stock","setStock","notifyOpen","setNotifyOpen","mounted","setMounted","priceId","stripePriceId","skuKey","sku","pid","productId","listed","ids","x","phoneOnly","category","phoneServices","pickDevice","deviceServices","controller","query","r","byPrice","data","entry","sync","SERVICES_EVENT","t","serviceOptions","sv","selectedService","optionIds","wanted","unit","price","purchasable","isService","lg","size","selectId","showServices","handleAdd","productName","existingService","lineId","existing","monthly","image","productUrl","OPEN_EVENT","base","phonesUrl","devicesUrl","href","pickDeviceLabel","cartButton","tel","mail","outlineLink","notifyLabel","SANS","NotifyDialog","serviceLabel","servicePlaceholder","HARDWARE_ONLY","hardwareOnlyLabel","fmt","label","l","addedLabel","email","setEmail","quantity","setQuantity","website","setWebsite","state","setState","error","setError","emailRef","onKey","onClose","submit","e","err","field","labelText","primaryButton","init_AddToCart","n"],"sources":["https:/framerusercontent.com/modules/J2n71KFb7XJyMy5TsuqO/6yL33xdzJSpX3QtIk46L/AddToCart.js"],"sourcesContent":["// Add To Cart — writes a product line into the shared browser cart.\n// Cart state lives in localStorage (\"ir-cart-v2\") and is shared with the\n// Cart Button component through window events. Nothing is charged here:\n// checkout sends Stripe Price IDs to the customer portal, and Stripe sets\n// the amount.\n//\n// Rules:\n// - A service chosen with a device rides on the device's line, so their\n//   quantities are always equal (2 radios = 2 services).\n// - An order carries at most one service (e.g. never PTToC and Zello together).\n// - Plans sold per device (Device Services) are never added on their own: their\n//   button sends the buyer to the device list with the plan remembered, and the\n//   device page pre-selects it in the service dropdown.\n// - The cart always carries the regular Stripe price. The portal sells only that\n//   price; a sale is a Stripe promotion code entered at checkout.\n// - Stock comes from the portal (by Stripe Price ID, else by SKU). Out of stock\n//   swaps the button for \"Notify me when in stock\", which records the request in\n//   the portal; the portal emails the buyer when it is back. The portal's\n//   checkout makes the same stock check and has the last word.\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";const CART_KEY=\"ir-cart-v2\";const CHANGE_EVENT=\"ir-cart-change\";const OPEN_EVENT=\"ir-cart-open\";const DEFAULT_PORTAL=\"https://portal.integratedradio.com\";// Service Option components on the page register the services ticked for this product.\nconst SERVICES_EVENT=\"ir-services-change\";// Dropdown value for \"Hardware only\"; \"\" means nothing chosen yet.\nconst HARDWARE_ONLY=\"__hardware_only__\";// Plan chosen on a plan page, carried to the device the buyer picks next.\nconst PRESELECT_KEY=\"ir-preselect-service\";const PRESELECT_PARAM=\"service\";const DEFAULT_DEVICE_SERVICES=\"managed-zello-core, managed-zello-plus\";const DEFAULT_PHONE_SERVICES=\"managed-zello-core-unlimited, managed-zello-plus-unlimited\";function readPreselect(){if(typeof window===\"undefined\")return\"\";const fromUrl=new URLSearchParams(window.location.search).get(PRESELECT_PARAM)||\"\";if(fromUrl){writePreselect(fromUrl);return fromUrl;}try{return window.sessionStorage.getItem(PRESELECT_KEY)||\"\";}catch{return\"\";}}function writePreselect(id){try{window.sessionStorage.setItem(PRESELECT_KEY,id);}catch{// Storage blocked: the ?service= link still works for the first page.\n}}function readRegisteredServices(){if(typeof window===\"undefined\")return[];const w=window;return w.__irServices?Array.from(w.__irServices.values()):[];}function readCart(){if(typeof window===\"undefined\")return[];try{const parsed=JSON.parse(window.localStorage.getItem(CART_KEY)||\"[]\");return Array.isArray(parsed)?parsed:[];}catch{return[];}}function writeCart(items){if(typeof window===\"undefined\")return;try{window.localStorage.setItem(CART_KEY,JSON.stringify(items));}catch{// Storage can be blocked (private mode); the cart then lasts for this page only.\n}window.dispatchEvent(new CustomEvent(CHANGE_EVENT));}/** The one service already in the cart, if any. */function cartService(items){for(const i of items){if(i.service)return{id:i.service.id,name:i.service.name};if(i.isService)return{id:i.productId,name:i.name};}return null;}const SANS='\"Public Sans\", \"Public Sans Placeholder\", sans-serif';const fmt=n=>new Intl.NumberFormat(\"en-US\",{style:\"currency\",currency:\"USD\"}).format(n);/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function AddToCart(props){const{productId,productName,category=\"Devices\",price=0,monthly=false,stripePriceId=\"\",image,productUrl=\"\",sku=\"\",notifyLabel=\"Notify me when in stock\",label=\"Add to cart\",addedLabel=\"Added\",size=\"LG\",serviceLabel=\"Service plan\",hardwareOnlyLabel=\"Hardware only\",servicePlaceholder=\"Please select service option\",deviceServices=DEFAULT_DEVICE_SERVICES,pickDeviceLabel=\"Select plan & choose a device\",devicesUrl=\"/products\",phoneServices=DEFAULT_PHONE_SERVICES,phonesUrl=\"/products?device=Rugged+phone\",portalUrl=DEFAULT_PORTAL}=props;const portal=(portalUrl||DEFAULT_PORTAL).replace(/\\/+$/,\"\");const isStatic=useIsStaticRenderer();const[justAdded,setJustAdded]=useState(false);const[hover,setHover]=useState(false);// \"\" until the visitor picks something, so nobody lands on Hardware only by accident.\nconst[serviceId,setServiceId]=useState(\"\");const[services,setServices]=useState([]);const[notice,setNotice]=useState(\"\");const[stock,setStock]=useState(null);const[notifyOpen,setNotifyOpen]=useState(false);const[mounted,setMounted]=useState(false);const priceId=stripePriceId.trim();const skuKey=sku.trim().toUpperCase();const pid=productId||priceId;const listed=ids=>ids.split(\",\").map(x=>x.trim()).filter(Boolean).includes(pid);// Phone-only plans (unlimited talk, text & data) send buyers to the rugged phones.\nconst phoneOnly=category===\"Services\"&&listed(phoneServices);const pickDevice=phoneOnly||category===\"Services\"&&listed(deviceServices);useEffect(()=>setMounted(true),[]);// Asked once per page load; the portal caches the answer for 30 seconds.\nuseEffect(()=>{if(isStatic||pickDevice||!priceId&&!skuKey||typeof window===\"undefined\")return;const controller=new AbortController;const query=new URLSearchParams;if(priceId)query.set(\"prices\",priceId);if(skuKey)query.set(\"skus\",skuKey);fetch(`${portal}/api/catalogue/availability?${query.toString()}`,{signal:controller.signal}).then(r=>r.ok?r.json():null).then(data=>{const byPrice=priceId?data?.prices?.[priceId]:null;const entry=byPrice&&byPrice.status!==\"unavailable\"?byPrice:skuKey?data?.skus?.[skuKey]:byPrice;if(!entry)return;startTransition(()=>setStock({status:String(entry.status||\"\"),available:entry.available!==false,label:entry.label||null,phone:String(data.contact?.phone||\"\"),email:String(data.contact?.email||\"\")}));})// Portal unreachable: leave the button as it is; checkout still checks.\n.catch(()=>undefined);return()=>controller.abort();},[isStatic,pickDevice,portal,priceId,skuKey]);useEffect(()=>{if(typeof window===\"undefined\")return;const sync=()=>startTransition(()=>setServices(readRegisteredServices()));sync();window.addEventListener(SERVICES_EVENT,sync);return()=>window.removeEventListener(SERVICES_EVENT,sync);},[]);useEffect(()=>{if(!justAdded)return;const t=window.setTimeout(()=>startTransition(()=>setJustAdded(false)),1800);return()=>window.clearTimeout(t);},[justAdded]);// Only priced items in the Services category are offered, even if something\n// else was ticked in the CMS reference field.\nconst serviceOptions=services.filter(sv=>sv&&sv.id&&sv.name&&(!sv.category||sv.category===\"Services\")).map(sv=>({id:String(sv.id),name:String(sv.name),unit:Number(sv.price)||0,monthly:Boolean(sv.monthly),priceId:String(sv.stripePriceId||\"\").trim()})).filter(sv=>sv.unit>0);const selectedService=serviceOptions.find(sv=>sv.id===serviceId);// Arriving from a plan page: start the dropdown on that plan.\nconst optionIds=serviceOptions.map(sv=>sv.id).join(\",\");useEffect(()=>{if(serviceId||!optionIds)return;const wanted=readPreselect();if(wanted&&optionIds.split(\",\").includes(wanted))startTransition(()=>setServiceId(wanted));},[optionIds]);// The cart shows what Stripe will charge: the regular price. The Sale and\n// Stripe Sale controls stay so existing CMS bindings still resolve.\nconst unit=price;// Priced products always show the button. Lines without a Stripe Price ID can\n// sit in the cart, but the cart refuses to check them out.\nconst purchasable=unit>0;const isService=category===\"Services\";const lg=size===\"LG\";const selectId=`svc-${(productId||\"product\").replace(/[^a-z0-9-]/gi,\"\")}`;const showServices=serviceOptions.length>0&&!isService;// Quote-only products (no price) show no button on the live site.\nif(!purchasable&&!isStatic)return null;function handleAdd(){if(!purchasable||pickDevice)return;if(showServices&&!serviceId){startTransition(()=>setNotice(\"Please choose a service option, or Hardware only, before adding to cart.\"));if(typeof document!==\"undefined\")document.getElementById(selectId)?.focus();return;}const items=readCart();// One service per order.\nconst wanted=isService?{id:pid,name:productName}:selectedService;const existingService=cartService(items);if(wanted&&existingService&&existingService.id!==wanted.id){startTransition(()=>setNotice(`Your cart already has ${existingService.name}. An order can include one service, so remove it from the cart to switch to ${wanted.name}.`));return;}startTransition(()=>setNotice(\"\"));const lineId=selectedService&&!isService?`${pid}+${selectedService.id}`:pid;const existing=items.find(i=>i.id===lineId);if(existing){// Refresh the price in case it changed since the line was added.\nexisting.priceId=priceId;existing.unit=unit;existing.monthly=monthly;if(selectedService&&!isService)existing.service=selectedService;existing.qty=Math.min(existing.qty+1,99);}else{items.push({id:lineId,productId:pid,priceId,name:productName||\"Product\",unit,monthly,image:image?.src,url:productUrl||(typeof window!==\"undefined\"?window.location.pathname:\"\"),qty:1,...selectedService&&!isService?{service:selectedService}:{},...isService?{isService:true}:{}});}writeCart(items);window.dispatchEvent(new CustomEvent(OPEN_EVENT));startTransition(()=>setJustAdded(true));}// Only a real stock-out swaps the button. A price the portal does not know\n// (\"unavailable\") keeps it, so a catalogue not yet synced cannot hide the\n// whole store; checkout explains that case if someone tries.\nif(pickDevice){const base=(phoneOnly?phonesUrl:devicesUrl)||\"/products\";const href=`${base}${base.includes(\"?\")?\"&\":\"?\"}${PRESELECT_PARAM}=${encodeURIComponent(pid)}`;return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",display:\"flex\",flexDirection:\"column\"},children:/*#__PURE__*/_jsxs(\"a\",{href:href,onClick:()=>writePreselect(pid),onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),\"aria-label\":`${pickDeviceLabel}: ${productName}`,style:{...cartButton(lg,hover),textDecoration:\"none\"},children:[/*#__PURE__*/_jsx(\"span\",{children:pickDeviceLabel}),/*#__PURE__*/_jsxs(\"svg\",{width:20,height:20,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M5 12h14\"}),/*#__PURE__*/_jsx(\"path\",{d:\"m12 5 7 7-7 7\"})]})]})});}if(stock&&stock.status===\"out_of_stock\"&&!isStatic){const tel=stock.phone.replace(/[^0-9+]/g,\"\");const mail=`mailto:${stock.email}?subject=${encodeURIComponent(`Stock: ${productName||\"Product\"}`)}`;return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",display:\"flex\",flexDirection:\"column\",gap:10},children:[/*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:()=>setNotifyOpen(true),\"aria-haspopup\":\"dialog\",style:{...outlineLink(lg),flex:\"none\",width:\"100%\",cursor:\"pointer\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:20,height:20,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",style:{marginRight:10},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M10.3 21a1.94 1.94 0 0 0 3.4 0\"})]}),notifyLabel]}),tel||stock.email?/*#__PURE__*/_jsxs(\"p\",{style:{margin:0,fontFamily:SANS,fontSize:14,lineHeight:1.5,color:\"rgb(90, 107, 128)\"},children:[\"Need it sooner? \",tel?/*#__PURE__*/_jsx(\"a\",{href:`tel:${tel}`,style:{color:\"rgb(11, 79, 214)\"},children:\"Call us\"}):null,tel&&stock.email?\" or \":null,stock.email?/*#__PURE__*/_jsx(\"a\",{href:mail,style:{color:\"rgb(11, 79, 214)\"},children:\"email us\"}):null,\".\"]}):null,mounted&&notifyOpen&&typeof document!==\"undefined\"?/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(NotifyDialog,{portal:portal,productName:productName||\"this product\",priceId:priceId,sku:skuKey,url:productUrl?new URL(productUrl,window.location.origin).href:window.location.href,onClose:()=>setNotifyOpen(false)}),document.body):null]});}return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",display:\"flex\",flexDirection:\"column\",gap:12,minWidth:showServices?260:undefined},children:[showServices?/*#__PURE__*/_jsxs(\"label\",{htmlFor:selectId,style:{display:\"flex\",flexDirection:\"column\",gap:8},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:SANS,fontSize:14,fontWeight:600,color:\"rgb(14, 25, 41)\"},children:serviceLabel}),/*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"block\"},children:[/*#__PURE__*/_jsxs(\"select\",{id:selectId,value:serviceId,onChange:e=>{setServiceId(e.target.value);setNotice(\"\");},style:{width:\"100%\",height:48,padding:\"0 44px 0 14px\",borderRadius:6,border:\"1px solid rgb(183, 194, 206)\",background:\"#fff\",color:serviceId?\"rgb(14, 25, 41)\":\"rgb(90, 107, 128)\",fontFamily:SANS,fontSize:16,appearance:\"none\",WebkitAppearance:\"none\",cursor:\"pointer\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"option\",{value:\"\",disabled:true,children:servicePlaceholder}),/*#__PURE__*/_jsx(\"option\",{value:HARDWARE_ONLY,children:hardwareOnlyLabel}),serviceOptions.map(sv=>/*#__PURE__*/_jsxs(\"option\",{value:sv.id,children:[sv.name,\" (+\",fmt(sv.unit),sv.monthly?\" / month\":\"\",\" per device)\"]},sv.id))]}),/*#__PURE__*/_jsx(\"svg\",{width:18,height:18,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"rgb(90, 107, 128)\",strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",style:{position:\"absolute\",right:14,top:15,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"m6 9 6 6 6-6\"})})]})]}):null,/*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:handleAdd,onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),\"aria-label\":`${label}: ${productName}${selectedService?` with ${selectedService.name}`:\"\"}`,style:cartButton(lg,hover),children:[/*#__PURE__*/_jsx(\"svg\",{width:20,height:20,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:justAdded?/*#__PURE__*/_jsx(\"path\",{d:\"M20 6 9 17l-5-5\"}):/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"path\",{d:\"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M3 6h18\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M16 10a4 4 0 0 1-8 0\"})]})}),/*#__PURE__*/_jsx(\"span\",{children:justAdded?addedLabel:label})]}),notice?/*#__PURE__*/_jsx(\"p\",{role:\"alert\",style:{margin:0,fontFamily:SANS,fontSize:14,lineHeight:1.5,color:\"rgb(179, 30, 24)\"},children:notice}):null]});}/** \"Notify me when in stock\": an email and a quantity, posted to the portal. */function NotifyDialog({portal,productName,priceId,sku,url,onClose}){const[email,setEmail]=useState(\"\");const[quantity,setQuantity]=useState(\"1\");const[website,setWebsite]=useState(\"\");const[state,setState]=useState(\"idle\");const[error,setError]=useState(\"\");const emailRef=useRef(null);useEffect(()=>{emailRef.current?.focus();const onKey=e=>{if(e.key===\"Escape\")onClose();};window.addEventListener(\"keydown\",onKey);return()=>window.removeEventListener(\"keydown\",onKey);},[onClose]);function submit(e){e.preventDefault();if(state===\"sending\")return;startTransition(()=>{setState(\"sending\");setError(\"\");});fetch(`${portal}/api/catalogue/stock-requests`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",Accept:\"application/json\"},body:JSON.stringify({email,quantity:Math.max(1,Math.min(999,Number(quantity)||1)),price:priceId,sku,url,website})}).then(async r=>{const data=await r.json().catch(()=>null);if(!r.ok)throw new Error(data?.message||\"Something went wrong. Please try again.\");startTransition(()=>setState(\"done\"));}).catch(err=>startTransition(()=>{setState(\"idle\");setError(err.message===\"Failed to fetch\"?\"We could not reach our server. Please try again.\":err.message);}));}const field={width:\"100%\",height:46,padding:\"0 12px\",boxSizing:\"border-box\",borderRadius:6,border:\"1px solid rgb(183, 194, 206)\",fontFamily:SANS,fontSize:16,color:\"rgb(14, 25, 41)\",background:\"#fff\"};const labelText={fontFamily:SANS,fontSize:14,fontWeight:600,color:\"rgb(14, 25, 41)\"};return /*#__PURE__*/_jsxs(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",\"aria-labelledby\":\"ir-notify-title\",style:{position:\"fixed\",inset:0,zIndex:1e3,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:16,fontFamily:SANS},children:[/*#__PURE__*/_jsx(\"div\",{onClick:onClose,style:{position:\"absolute\",inset:0,background:\"rgba(14, 25, 41, 0.55)\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",maxWidth:440,background:\"#fff\",borderRadius:10,padding:24,boxShadow:\"0 20px 50px rgba(14, 25, 41, 0.25)\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:onClose,\"aria-label\":\"Close\",style:{position:\"absolute\",top:12,right:12,width:36,height:36,border:\"none\",background:\"none\",cursor:\"pointer\",color:\"rgb(90, 107, 128)\",fontSize:24,lineHeight:1},children:\"\\xd7\"}),/*#__PURE__*/_jsx(\"h2\",{id:\"ir-notify-title\",style:{margin:\"0 32px 6px 0\",fontSize:21,lineHeight:1.3,fontWeight:600,color:\"rgb(14, 25, 41)\"},children:state===\"done\"?\"You're on the list\":\"Get notified when it's back\"}),state===\"done\"?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"p\",{style:{margin:\"0 0 20px\",fontSize:16,lineHeight:1.5,color:\"rgb(52, 68, 88)\"},children:[\"We'll email \",/*#__PURE__*/_jsx(\"strong\",{children:email}),\" as soon as \",productName,\" is back in stock.\"]}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:onClose,style:{...primaryButton(),width:\"100%\"},children:\"Done\"})]}):/*#__PURE__*/_jsxs(\"form\",{onSubmit:submit,noValidate:true,style:{display:\"flex\",flexDirection:\"column\",gap:14},children:[/*#__PURE__*/_jsxs(\"p\",{style:{margin:0,fontSize:16,lineHeight:1.5,color:\"rgb(52, 68, 88)\"},children:[productName,\" is out of stock. Leave your email and we'll let you know when it's available.\"]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:6},children:[/*#__PURE__*/_jsx(\"span\",{style:labelText,children:\"Email\"}),/*#__PURE__*/_jsx(\"input\",{ref:emailRef,type:\"email\",required:true,autoComplete:\"email\",value:email,onChange:e=>setEmail(e.target.value),style:field})]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:6},children:[/*#__PURE__*/_jsx(\"span\",{style:labelText,children:\"How many do you need?\"}),/*#__PURE__*/_jsx(\"input\",{type:\"number\",min:1,max:999,inputMode:\"numeric\",value:quantity,onChange:e=>setQuantity(e.target.value),style:{...field,maxWidth:120}})]}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"website\",tabIndex:-1,autoComplete:\"off\",\"aria-hidden\":\"true\",value:website,onChange:e=>setWebsite(e.target.value),style:{position:\"absolute\",left:-9999,width:1,height:1,opacity:0}}),error?/*#__PURE__*/_jsx(\"p\",{role:\"alert\",style:{margin:0,fontSize:14,lineHeight:1.5,color:\"rgb(179, 30, 24)\"},children:error}):null,/*#__PURE__*/_jsx(\"button\",{type:\"submit\",disabled:state===\"sending\",style:{...primaryButton(),width:\"100%\",opacity:state===\"sending\"?.7:1},children:state===\"sending\"?\"Sending…\":\"Notify me\"})]})]})]});}function primaryButton(){return{height:48,padding:\"0 22px\",border:\"none\",borderRadius:6,background:\"rgb(11, 79, 214)\",color:\"#fff\",fontFamily:SANS,fontWeight:600,fontSize:17,cursor:\"pointer\"};}function outlineLink(lg){return{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",flex:\"1 1 0\",height:lg?48:40,padding:lg?\"0 22px\":\"0 16px\",minWidth:\"max-content\",boxSizing:\"border-box\",borderRadius:6,border:\"1px solid rgb(11, 79, 214)\",color:\"rgb(11, 79, 214)\",background:\"#fff\",fontFamily:SANS,fontWeight:600,fontSize:lg?18:15,textDecoration:\"none\",whiteSpace:\"nowrap\"};}function cartButton(lg,hover){return{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:10,width:\"100%\",height:lg?48:40,padding:lg?\"0 26px\":\"0 18px\",minWidth:\"max-content\",boxSizing:\"border-box\",border:\"none\",borderRadius:6,background:hover?\"rgb(9, 64, 174)\":\"rgb(11, 79, 214)\",color:\"#fff\",fontFamily:SANS,fontWeight:600,fontSize:lg?18:15,lineHeight:1,cursor:\"pointer\",transition:\"background 0.2s ease\",whiteSpace:\"nowrap\"};}addPropertyControls(AddToCart,{serviceLabel:{type:ControlType.String,title:\"Service Label\",defaultValue:\"Service plan\"},hardwareOnlyLabel:{type:ControlType.String,title:\"No Service\",defaultValue:\"Hardware only\"},servicePlaceholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"Please select service option\"},deviceServices:{type:ControlType.String,title:\"Device Services\",defaultValue:DEFAULT_DEVICE_SERVICES,description:\"Plan IDs sold per device: their button goes to the device list instead of the cart.\"},pickDeviceLabel:{type:ControlType.String,title:\"Pick Device\",defaultValue:\"Select plan & choose a device\"},devicesUrl:{type:ControlType.String,title:\"Devices URL\",defaultValue:\"/products\"},phoneServices:{type:ControlType.String,title:\"Phone Services\",defaultValue:DEFAULT_PHONE_SERVICES,description:\"Plan IDs sold only with rugged phones: their button goes to Phones URL.\"},phonesUrl:{type:ControlType.String,title:\"Phones URL\",defaultValue:\"/products?device=Rugged+phone\"},productId:{type:ControlType.String,title:\"Product ID\",defaultValue:\"product\"},productName:{type:ControlType.String,title:\"Name\",defaultValue:\"Product\"},category:{type:ControlType.String,title:\"Category\",defaultValue:\"Devices\"},price:{type:ControlType.Number,title:\"Price\",defaultValue:0,min:0,step:.01,displayStepper:true},sale:{type:ControlType.Number,title:\"Sale\",defaultValue:0,min:0,step:.01,displayStepper:true},monthly:{type:ControlType.Boolean,title:\"Monthly\",defaultValue:false},stripePriceId:{type:ControlType.String,title:\"Stripe Price\",defaultValue:\"\"},stripeSalePriceId:{type:ControlType.String,title:\"Stripe Sale\",defaultValue:\"\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},productUrl:{type:ControlType.String,title:\"URL\",defaultValue:\"\"},sku:{type:ControlType.String,title:\"SKU\",defaultValue:\"\"},notifyLabel:{type:ControlType.String,title:\"Notify Label\",defaultValue:\"Notify me when in stock\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Add to cart\"},addedLabel:{type:ControlType.String,title:\"Added Label\",defaultValue:\"Added\"},size:{type:ControlType.Enum,title:\"Size\",options:[\"LG\",\"MD\"],defaultValue:\"LG\",displaySegmentedControl:true},portalUrl:{type:ControlType.String,title:\"Portal URL\",defaultValue:DEFAULT_PORTAL,placeholder:DEFAULT_PORTAL}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AddToCart\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AddToCart.map"],"mappings":"A,yOAsB4O,SAASmB,GAAe,CAAC,GAAUZ,IAAS,OAAY,MAAM,GAAG,IAAMa,EAAQ,IAAI,gBAAgBb,EAAO,SAAS,MAAM,CAAC,CAAC,IAAIc,CAAe,GAAG,GAAG,GAAGD,EAAiC,OAAxBE,EAAeF,CAAO,EAASA,EAAS,GAAG,CAAC,OAAOb,EAAO,eAAe,QAAQgB,CAAa,GAAG,EAAG,MAAM,CAAC,MAAM,EAAG,CAAC,CAAC,SAASD,EAAe,EAAG,CAAC,GAAG,CAACf,EAAO,eAAe,QAAQgB,EAAcC,CAAE,CAAE,MAAM,CACxlB,CAAC,CAAC,SAASC,GAAwB,CAAC,GAAUlB,IAAS,OAAY,MAAM,CAAC,EAAE,IAAMmB,EAAEnB,EAAO,OAAOmB,EAAE,aAAa,MAAM,KAAKA,EAAE,aAAa,OAAO,CAAC,EAAE,CAAC,CAAE,CAAC,SAASC,GAAU,CAAC,GAAUpB,IAAS,OAAY,MAAM,CAAC,EAAE,GAAG,CAAC,IAAMqB,EAAO,KAAK,MAAMrB,EAAO,aAAa,QAAQsB,CAAQ,GAAG,IAAI,EAAE,OAAO,MAAM,QAAQD,CAAM,EAAEA,EAAO,CAAC,CAAE,MAAM,CAAC,MAAM,CAAC,CAAE,CAAC,CAAC,SAASE,EAAU,EAAM,CAAC,GAAUvB,IAAS,OAAmB,IAAG,CAACA,EAAO,aAAa,QAAQsB,EAAS,KAAK,UAAUE,CAAK,CAAC,CAAE,MAAM,CAC7d,CAACxB,EAAO,cAAc,IAAI,YAAYyB,CAAY,CAAC,CAAnD,CAAqD,CAAoD,SAASC,EAAY,EAAM,CAAC,I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