{"version":3,"file":"Track_PageView.DevaUmlw.mjs","names":["useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/HFdEOxNSRuljGN1egHmi/eqcb86iJa5Z4jBejeWJl/Track_PageView.js"],"sourcesContent":["import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{store_ProductPropsStore}from\"https://framerusercontent.com/modules/XlGHH84z4WYiDTmjfihj/lG3lMrbhuKDuQZoeUnqQ/store_ProductPropsStore.js\";import{store_Country}from\"https://framerusercontent.com/modules/uEbYfRswpEkLoguEXuyc/aJGVne8id8ZJMOpoLekR/store_Country.js\";import tracking from\"https://framerusercontent.com/modules/hf8dXdUvjqiYuDILvSsp/9YEcKNGDWVdpvbqjouVK/utils_Tracking.js\";export default function Track_PageView({pageCategory,tnsExperiment}){const[store,setStore]=store_ProductPropsStore();const[country,_]=store_Country();const isMounted=useRef(false);useEffect(()=>{if(typeof window!==\"undefined\"){if(!isMounted.current){tracking.trackPageView({...pageCategory?{page_category:pageCategory}:{},page_location:window?.location?.href||\"\",page_path:window?.location?.pathname||\"\",page_title:document?.title||\"\",countryCode:country?.countryCode||\"\",customerId:store?.customerId||\"\"});isMounted.current=true;}}},[]);return /*#__PURE__*/_jsx(_Fragment,{});}// /////////////////////////////////////////////////////////////////\n// STYLES\n// /////////////\nTrack_PageView.defaultProps={pageCategory:\"\"};addPropertyControls(Track_PageView,{pageCategory:{type:ControlType.String,defaultValue:\"\"},tnsExperiment:{type:ControlType.String,defaultValue:\"\"}})// /////////////////////////////////////////////////////////////////\n// STYLES\n// /////////////\n// const [customerId, setCustomerId] = useState<string>(store.customerId)\n// const [productFormat, setProductFormat] = useState<string>(\n//     store.productFormat\n// )\n// const [countryCode, setCountryCode] = useState<string>(country.countryCode)\n// const [props, setProps] = useState<string>(\"\")\n// useEffect(() => {\n//     if (!store.pageLoaded) {\n//         return\n//     }\n//     const props = {\n//         pageLoaded: store.pageLoaded,\n//         productFormat: store.productFormat,\n//         customerId: store.customerId,\n//         countryCode: country?.countryCode || \"\",\n//         //\n//         jewelryPiece: store.jewelryPiece,\n//         jewelryMaterial: store.jewelryMaterial,\n//         jewelrySize: store.jewelrySize,\n//         jewelryBezelMount: store.jewelryBezelMount,\n//         jewelryChain: store.jewelryChain,\n//     }\n//     setProps(JSON.stringify(props))\n//     // setCustomerId(store.customerId)\n//     // setProductFormat(store.productFormat)\n//     // setCountryCode(country.countryCode)\n// }, [\n//     store.pageLoaded,\n//     store.productFormat,\n//     store.customerId,\n//     //\n//     store.jewelryPiece,\n//     store.jewelryMaterial,\n//     store.jewelrySize,\n//     store.jewelryBezelMount,\n//     store.jewelryChain,\n//     //\n//     country,\n//     country.countryCode,\n// ])\n;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Track_PageView\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Track_PageView.map"],"mappings":"yTAA6hB,SAAwB,EAAe,CAAC,eAAa,iBAAe,CAAC,GAAK,CAAC,EAAM,GAAU,GAAyB,CAAM,CAAC,EAAQ,GAAG,GAAe,CAAO,EAAUA,EAAO,GAAM,CAAuW,OAAtW,MAAc,CAAW,IAAS,SAAqS,EAAU,WAA3Q,EAAS,cAAc,CAAC,GAAG,EAAa,CAAC,cAAc,EAAa,CAAC,EAAE,CAAC,cAAc,GAAQ,UAAU,MAAM,GAAG,UAAU,GAAQ,UAAU,UAAU,GAAG,WAAW,UAAU,OAAO,GAAG,YAAY,GAAS,aAAa,GAAG,WAAW,GAAO,YAAY,GAAG,CAAC,CAAmB,MAAS,EAAE,CAAC,CAAqB,EAAKC,EAAU,EAAE,CAAC,sBAA5hC,IAAoC,IAAoD,IAAgJ,IAA4H,IAAwH,CAG7hB,EAAe,aAAa,CAAC,aAAa,GAAG,CAAC,EAAoB,EAAe,CAAC,aAAa,CAAC,KAAK,EAAY,OAAO,aAAa,GAAG,CAAC,cAAc,CAAC,KAAK,EAAY,OAAO,aAAa,GAAG,CAAC,CAAC"}