{
  "version": 3,
  "sources": ["../../src/store/selectors.js"],
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createSelector } from '@wordpress/data';\n\n/**\n * Returns the registered static commands.\n *\n * @param {Object}  state      State tree.\n * @param {boolean} contextual Whether to return only contextual commands.\n *\n * @return {import('./actions').WPCommandConfig[]} The list of registered commands.\n */\nexport const getCommands = createSelector(\n\t( state, contextual = false ) =>\n\t\tObject.values( state.commands ).filter( ( command ) => {\n\t\t\tconst isContextual =\n\t\t\t\tcommand.context && command.context === state.context;\n\t\t\treturn contextual ? isContextual : ! isContextual;\n\t\t} ),\n\t( state ) => [ state.commands, state.context ]\n);\n\n/**\n * Returns the registered command loaders.\n *\n * @param {Object}  state      State tree.\n * @param {boolean} contextual Whether to return only contextual command loaders.\n *\n * @return {import('./actions').WPCommandLoaderConfig[]} The list of registered command loaders.\n */\nexport const getCommandLoaders = createSelector(\n\t( state, contextual = false ) =>\n\t\tObject.values( state.commandLoaders ).filter( ( loader ) => {\n\t\t\tconst isContextual =\n\t\t\t\tloader.context && loader.context === state.context;\n\t\t\treturn contextual ? isContextual : ! isContextual;\n\t\t} ),\n\t( state ) => [ state.commandLoaders, state.context ]\n);\n\n/**\n * Returns whether the command palette is open.\n *\n * @param {Object} state State tree.\n *\n * @return {boolean} Returns whether the command palette is open.\n */\nexport function isOpen( state ) {\n\treturn state.isOpen;\n}\n\n/**\n * Returns whether the active context.\n *\n * @param {Object} state State tree.\n *\n * @return {string} Context.\n */\nexport function getContext( state ) {\n\treturn state.context;\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA+B;AAUxB,IAAM,kBAAc;AAAA,EAC1B,CAAE,OAAO,aAAa,UACrB,OAAO,OAAQ,MAAM,QAAS,EAAE,OAAQ,CAAE,YAAa;AACtD,UAAM,eACL,QAAQ,WAAW,QAAQ,YAAY,MAAM;AAC9C,WAAO,aAAa,eAAe,CAAE;AAAA,EACtC,CAAE;AAAA,EACH,CAAE,UAAW,CAAE,MAAM,UAAU,MAAM,OAAQ;AAC9C;AAUO,IAAM,wBAAoB;AAAA,EAChC,CAAE,OAAO,aAAa,UACrB,OAAO,OAAQ,MAAM,cAAe,EAAE,OAAQ,CAAE,WAAY;AAC3D,UAAM,eACL,OAAO,WAAW,OAAO,YAAY,MAAM;AAC5C,WAAO,aAAa,eAAe,CAAE;AAAA,EACtC,CAAE;AAAA,EACH,CAAE,UAAW,CAAE,MAAM,gBAAgB,MAAM,OAAQ;AACpD;AASO,SAAS,OAAQ,OAAQ;AAC/B,SAAO,MAAM;AACd;AASO,SAAS,WAAY,OAAQ;AACnC,SAAO,MAAM;AACd;",
  "names": []
}
