{"version":3,"file":"utils.BdgiSmpd.mjs","names":["useMemo","__esmMin","pe","init_npm_react_18_3_1","init_framer_DymZktPS","ControlType","getIconSelection","selectByList","iconSelection","iconSearch","iconSearchTerm","lowercaseIconKeyPairs","findByArray","iconKeys","useIconSelection","iconSearchResult","defaultEvents","init_utils","arr","a","search"],"sources":["https:/framerusercontent.com/modules/Ma20hU0GGRxLxZphbywl/OSpwWF91FHPVFyQJjMHt/utils.js"],"sourcesContent":["import{useMemo}from\"react\";import{ControlType}from\"framer\";/*\n ** ICON UTILS\n ** Pull as much re-usable logic into here as possible\n ** This will make it easier to replace in all icon components\n */ export const containerStyles={width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"};export const defaultEvents={onClick:{type:ControlType.EventHandler},onMouseDown:{type:ControlType.EventHandler},onMouseUp:{type:ControlType.EventHandler},onMouseEnter:{type:ControlType.EventHandler},onMouseLeave:{type:ControlType.EventHandler}};const findByArray=(arr,search)=>arr.find(a=>a.toLowerCase().includes(search));export function getIconSelection(iconKeys,selectByList,iconSearch=\"\",iconSelection,lowercaseIconKeyPairs){// gotta get the exact match first THEN find\n// have a set and try to access ?\nif(selectByList)return iconSelection;if(iconSearch==null||(iconSearch===null||iconSearch===void 0?void 0:iconSearch.length)===0)return null;const iconSearchTerm=iconSearch.toLowerCase().replace(/-|\\s/g,\"\");var _iconSearchTerm;// check for exact match, otherwise use .find\nconst searchResult=(_iconSearchTerm=lowercaseIconKeyPairs[iconSearchTerm])!==null&&_iconSearchTerm!==void 0?_iconSearchTerm:findByArray(iconKeys,iconSearchTerm);return searchResult;}export function useIconSelection(iconKeys,selectByList,iconSearch=\"\",iconSelection,lowercaseIconKeyPairs){// Clean search term\nconst iconSearchResult=useMemo(()=>{if(iconSearch==null||(iconSearch===null||iconSearch===void 0?void 0:iconSearch.length)===0)return null;const iconSearchTerm=iconSearch.toLowerCase().replace(/-|\\s/g,\"\");var _iconSearchTerm;// check for exact match, otherwise use .find\nconst searchResult=(_iconSearchTerm=lowercaseIconKeyPairs[iconSearchTerm])!==null&&_iconSearchTerm!==void 0?_iconSearchTerm:findByArray(iconKeys,iconSearchTerm);return searchResult;},[iconSelection,iconSearch]);const name=selectByList?iconSelection:iconSearchResult;return name;}\nexport const __FramerMetadata__ = {\"exports\":{\"getIconSelection\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIconSelection\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./utils.map"],"mappings":"A,qJAI4b,SAAgBM,EAAiB,EAAS,EAAa,EAAW,GAAG,EAAc,EAAsB,CAEriB,GAAGC,EAAa,OAAOC,EAAc,GAAGC,GAAY,MAAOA,GAAyD,SAAU,EAAE,OAAO,KAAK,IAAMC,EAAeD,EAAW,YAAY,CAAC,CAAC,QAAQ,QAAQ,EAAE,EAC3C,OAA7HE,EAAsBD,IAAkEE,EAAYC,EAASH,CAAc,CAAsB,CAAC,SAAgBI,EAAiB,EAAS,EAAa,EAAW,GAAG,EAAc,EAAsB,CAC/R,IAAMC,EAAiBf,MAAY,CAAC,GAAGS,GAAY,MAAOA,GAAyD,SAAU,EAAE,OAAO,KAAK,IAAMC,EAAeD,EAAW,YAAY,CAAC,CAAC,QAAQ,QAAQ,EAAE,EAC1C,OAA7HE,EAAsBD,IAAkEE,EAAYC,EAASH,CAAc,CAAsB,EAAE,CAACF,EAAcC,CAAU,CAAC,EAAyD,OAA5CF,EAAaC,EAAcO,CAA6B,C,8CALhJ,EAAc,CAAC,QAAQ,CAAC,KAAKV,EAAY,YAAY,EAAE,YAAY,CAAC,KAAKA,EAAY,YAAY,EAAE,UAAU,CAAC,KAAKA,EAAY,YAAY,EAAE,aAAa,CAAC,KAAKA,EAAY,YAAY,EAAE,aAAa,CAAC,KAAKA,EAAY,YAAY,CAAC,EAAQ,GAAa,EAAI,IAASa,EAAI,KAAK,GAAGC,EAAE,YAAY,CAAC,CAAC,SAASC,CAAM,CAAC,C"}