{"version":3,"file":"store.js@_0.3.D1kbVBcd.mjs","names":[],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/hgUi7EbkZBqq9nQgrpOQ/createStore.js","https:/framer.com/m/framer/store.js@^0.3.0"],"sourcesContent":["import { Data, useObserveData } from \"framer\";\nexport function createStore(state) {\n    // Use Data so that a Preview reload resets the state\n    const store = Data({\n        state: Object.freeze({\n            ...state\n        })\n    });\n    // Create a set function that updates the state\n    const setStoreState = (newState)=>{\n        // If the state is an object, make sure we copy it\n        if (typeof newState === \"function\") {\n            newState = newState(store.state);\n        }\n        store.state = Object.freeze({\n            ...store.state,\n            ...newState\n        });\n    };\n    // Create the actual hook based on everything above\n    function useStore() {\n        useObserveData();\n        return [\n            store.state,\n            setStoreState\n        ];\n    }\n    return useStore;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@0.3.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/hgUi7EbkZBqq9nQgrpOQ/createStore.js\"\n"],"mappings":"6GACA,SAAgB,EAAY,EAAO,CAE/B,IAAM,EAAQ,EAAK,CACf,MAAO,OAAO,OAAO,CACjB,GAAG,EACN,CAAC,CACL,CAAC,CAEI,EAAiB,GAAW,CAE1B,OAAO,GAAa,aACpB,EAAW,EAAS,EAAM,MAAM,EAEpC,EAAM,MAAQ,OAAO,OAAO,CACxB,GAAG,EAAM,MACT,GAAG,EACN,CAAC,EAGN,SAAS,GAAW,CAEhB,OADA,GAAgB,CACT,CACH,EAAM,MACN,EACH,CAEL,OAAO,mBA3BmC"}