{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/fGOJBc4IVGqllbT0Tx74/Ls2uDKKGJTsJmkIrZS3f/Dropdown.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";const variants={open:{opacity:1,x:0},closed:{opacity:0,x:\"-100%\"}};// Type guard to check if an element is clickable\nconst isClickableElement=element=>{if(element instanceof HTMLElement){// Check if the element is an anchor, button, or has a tabindex attribute\nreturn element.tagName===\"A\"||element.tagName===\"BUTTON\"||element.hasAttribute(\"tabindex\");}return false;};function useOnClickOutside(ref,handler){useEffect(()=>{if(!window||!document){return;}const listener=event=>{if(!ref.current||ref.current.contains(event.target)){return;}handler(event);};document.addEventListener(\"mousedown\",listener);document.addEventListener(\"touchstart\",listener);return()=>{document.removeEventListener(\"mousedown\",listener);document.removeEventListener(\"touchstart\",listener);};},[ref,handler]);}export function withOpenHandler(Component){return props=>{const ref=useRef();const[isOpen,setOpen]=useState(false);useOnClickOutside(ref,()=>{setOpen(false);});return /*#__PURE__*/ _jsx(Component,{...props,ref:ref,open:isOpen,onClick:()=>{if(!isOpen){setOpen(true);}}});};}export function withAnimatePresence(Component){return props=>{return /*#__PURE__*/ _jsx(AnimatePresence,{initial:true,exitBeforeEnter:true,onExitComplete:()=>null,children:/*#__PURE__*/ _jsx(motion.div,{...props,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.1,delay:.1},children:/*#__PURE__*/ _jsx(Component,{style:{display:\"block\",width:\"100%\",height:\"100%\"},children:props.children})})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withOpenHandler\":{\"type\":\"reactHoc\",\"name\":\"withOpenHandler\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAnimatePresence\":{\"type\":\"reactHoc\",\"name\":\"withAnimatePresence\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\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AAC,CAAC,CAAC,CAAC,CAAI",
  "names": ["useOnClickOutside", "ref", "handler", "ue", "window", "listener", "event", "withOpenHandler", "Component", "props", "pe", "isOpen", "setOpen", "ye", "p", "withAnimatePresence", "AnimatePresence", "motion"]
}
