{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/higher-order/with-spoken-messages/index.tsx"],"sourcesContent":["import { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * A Higher Order Component used to provide speak and debounced speak functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {React.ComponentType} Component The component to be wrapped.\n *\n * @return {React.ComponentType} The wrapped component.\n */\nexport default createHigherOrderComponent(\n\t( Component ) =>\n\t\tfunction WithSpokenMessages( props ) {\n\t\t\treturn (\n\t\t\t\t<Component\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tspeak={ speak }\n\t\t\t\t\tdebouncedSpeak={ useDebounce( speak, 500 ) }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t'withSpokenMessages'\n);\n"],"mappings":";;;;;;;;;;;;;AAYA,IAAA,+BAAe,4BACZ,cACD,SAAS,mBAAoB,OAAQ;CACpC,OACC,oBAAC,WAAD;EACC,GAAK;EACG;EACR,gBAAiB,YAAa,OAAO,GAAI;CACzC,CAAA;AAEH,GACD,oBACD"}