{"version":3,"file":"Blocker.mjs","sources":["../../../../../admin/src/pages/EditView/components/Blocker.tsx"],"sourcesContent":["// Needs to be wrapped in a component to have access to the form context via a hook.\n\nimport { Blocker as BaseBlocker, useForm } from '@strapi/admin/strapi-admin';\n\n/**\n * Prevents users from leaving the page with unsaved form changes\n */\nconst Blocker = () => {\n const resetForm = useForm('Blocker', (state) => state.resetForm);\n\n // We reset the form to the published version to avoid errors like – https://strapi-inc.atlassian.net/browse/CONTENT-2284\n return ;\n};\n\nexport { Blocker };\n"],"names":["Blocker","resetForm","useForm","state","_jsx","BaseBlocker","onProceed"],"mappings":";;;AAAA;AAIA;;AAEC,UACKA,OAAAA,GAAU,IAAA;AACd,IAAA,MAAMC,YAAYC,OAAAA,CAAQ,SAAA,EAAW,CAACC,KAAAA,GAAUA,MAAMF,SAAS,CAAA;;AAG/D,IAAA,qBAAOG,GAAA,CAACC,SAAAA,EAAAA;QAAYC,SAAAA,EAAWL;;AACjC;;;;"}