{"version":3,"file":"use-runtime-actions.mjs","names":[],"sources":["../../src/hooks/use-runtime-actions.ts"],"sourcesContent":["import { useObservableValue } from '@wordpress/compose';\nimport type { WidgetRuntimeAction } from '@wordpress/widget-primitives';\nimport { useDashboardInternalContext } from '../context/dashboard-context';\n\nconst NO_RUNTIME_ACTIONS: WidgetRuntimeAction[] = [];\n\n/**\n * The runtime actions of one instance: what its first mounted render\n * declares, so a copy of the tile never takes them over.\n *\n * @param {string} uuid The instance.\n */\nexport function useRuntimeActions( uuid: string ): WidgetRuntimeAction[] {\n\tconst { runtimeActions } = useDashboardInternalContext();\n\tconst [ first ] =\n\t\tuseObservableValue( runtimeActions, uuid )?.values() ?? [];\n\n\treturn first ?? NO_RUNTIME_ACTIONS;\n}\n"],"mappings":";;;AAIA,MAAM,qBAA4C,CAAC;;;;;;;AAQnD,SAAgB,kBAAmB,MAAsC;CACxE,MAAM,EAAE,mBAAmB,4BAA4B;CACvD,MAAM,CAAE,SACP,mBAAoB,gBAAgB,IAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CAE1D,OAAO,SAAS;AACjB"}