{"version":3,"file":"OnboardingViewHistoryUpdater.7ATQN_3S.mjs","names":["ViewHistoryPageCategory"],"sources":["https:/framerusercontent.com/modules/xcyMtjRzKCxyjZ9zf62Y/OFnEwwUvzOeyTmK8tbOI/localStorage.js","https:/framerusercontent.com/modules/EqZXrk8bEzYoOYePPrTi/BHKXBH4QCAykgGt4LKRm/OnboardingViewHistoryUpdater.js"],"sourcesContent":["function readJSON(key){try{const jsonData=localStorage.getItem(key);if(!jsonData){return null;}return JSON.parse(jsonData);}catch{return null;}}function writeJSON(key,value){localStorage.setItem(key,JSON.stringify(value));}export const localStorageAPI={readJSON,writeJSON};\nexport const __FramerMetadata__ = {\"exports\":{\"localStorageAPI\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./localStorage.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,Frame}from\"framer\";import{useEffect}from\"react\";import{localStorageAPI}from\"https://framerusercontent.com/modules/xcyMtjRzKCxyjZ9zf62Y/OFnEwwUvzOeyTmK8tbOI/localStorage.js\";export var ViewHistoryPageCategory;(function(ViewHistoryPageCategory){ViewHistoryPageCategory[\"Industry\"]=\"industry\";ViewHistoryPageCategory[\"Product\"]=\"product\";ViewHistoryPageCategory[\"Template\"]=\"template\";})(ViewHistoryPageCategory||(ViewHistoryPageCategory={}));const ViewHistoryPageCategoryList=[\"industry\",\"product\",\"template\"];const VIEW_HISTORY_KEY=\"__lark_website_visit_history\";export default function OnboardingViewHistoryUpdater({PageCategory,PageName}){useEffect(()=>{if(PageName){const currentHistory=localStorageAPI.readJSON(VIEW_HISTORY_KEY);localStorageAPI.writeJSON(VIEW_HISTORY_KEY,{...currentHistory,[PageCategory]:PageName});}},[]);return /*#__PURE__*/_jsx(Frame,{width:\"100%\",height:\"1px\",background:\"transparent\"});}addPropertyControls(OnboardingViewHistoryUpdater,{PageCategory:{type:ControlType.Enum,options:ViewHistoryPageCategoryList,optionTitles:ViewHistoryPageCategoryList,title:\"Page Category\"},PageName:{type:ControlType.String,title:\"Page Name\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"ViewHistoryPageCategory\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"OnboardingViewHistoryUpdater\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OnboardingViewHistoryUpdater.map"],"mappings":"gOAAA,SAAS,EAAS,EAAI,CAAC,GAAG,CAAC,IAAM,EAAS,aAAa,QAAQ,EAAI,CAA4B,OAAvB,EAA8B,KAAK,MAAM,EAAS,CAAjC,IAAmC,MAAK,CAAC,OAAO,IAAM,CAAC,UAAS,EAAU,EAAI,EAAM,CAAC,aAAa,QAAQ,EAAI,KAAK,UAAU,EAAM,CAAC,AAAE,gBAAa,EAAgB,CAAC,WAAS,WAAU,ICAmY,SAAS,EAA6B,CAAC,eAAa,WAAS,CAAC,CAA4L,MAA3L,GAAU,IAAI,CAAC,GAAG,EAAS,CAAC,IAAM,EAAe,EAAgB,SAAS,EAAiB,CAAC,EAAgB,UAAU,EAAiB,CAAC,GAAG,GAAgB,GAAc,CAAS,EAAC,AAAE,CAAC,EAAC,CAAE,EAAC,CAAqB,EAAK,EAAM,CAAC,MAAM,OAAO,OAAO,MAAM,WAAW,aAAc,EAAC,AAAE,oBAAA,AAAn+B,GAA2C,IAA0D,IAA6B,IAA6H,CAAmC,AAAC,SAASA,EAAwB,CAA6F,AAA5F,EAAwB,SAAY,WAAW,EAAwB,QAAW,UAAU,EAAwB,SAAY,UAAY,EAA4B,IAAwB,CAAE,EAAE,CAAO,EAA4B,CAAC,WAAW,UAAU,UAAW,EAAO,EAAiB,+BAA8X,EAAoB,EAA6B,CAAC,aAAa,CAAC,KAAK,EAAY,KAAK,QAAQ,EAA4B,aAAa,EAA4B,MAAM,eAAgB,EAAC,SAAS,CAAC,KAAK,EAAY,OAAO,MAAM,WAAY,CAAC,EAAC"}