{
  "version": 3,
  "sources": ["../../src/store/private-actions.ts"],
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport { processBlockType } from './process-block-type';\nimport type { BlockBindingsSource, BlockType } from '../types';\nimport type { Action, BlocksStoreThunkArgs } from './types';\n\n/**\n * Add bootstrapped block type metadata to the store. These metadata usually come from\n * the `block.json` file and are either statically bootstrapped from the server, or\n * passed as the `metadata` parameter to the `registerBlockType` function.\n *\n * @param name      Block name.\n * @param blockType Block type metadata.\n */\nexport function addBootstrappedBlockType(\n\tname: string,\n\tblockType: Partial< BlockType >\n): Action {\n\treturn {\n\t\ttype: 'ADD_BOOTSTRAPPED_BLOCK_TYPE',\n\t\tname,\n\t\tblockType,\n\t};\n}\n\n/**\n * Add unprocessed block type settings to the store. These data are passed as the\n * `settings` parameter to the client-side `registerBlockType` function.\n *\n * @param name      Block name.\n * @param blockType Unprocessed block type settings.\n */\nexport function addUnprocessedBlockType(\n\tname: string,\n\tblockType: Partial< BlockType >\n) {\n\treturn ( { dispatch }: BlocksStoreThunkArgs ) => {\n\t\tdispatch( { type: 'ADD_UNPROCESSED_BLOCK_TYPE', name, blockType } );\n\t\tconst processedBlockType = dispatch(\n\t\t\tprocessBlockType( name, blockType )\n\t\t);\n\t\tif ( ! processedBlockType ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch.addBlockTypes( processedBlockType );\n\t};\n}\n\n/**\n * Adds new block bindings source.\n *\n * @param source The source to register.\n */\nexport function addBlockBindingsSource( source: BlockBindingsSource ): Action {\n\treturn {\n\t\ttype: 'ADD_BLOCK_BINDINGS_SOURCE',\n\t\tname: source.name,\n\t\tlabel: source.label,\n\t\tusesContext: source.usesContext,\n\t\tgetValues: source.getValues,\n\t\tsetValues: source.setValues,\n\t\tcanUserEditValue: source.canUserEditValue,\n\t\tgetFieldsList: source.getFieldsList,\n\t};\n}\n\n/**\n * Removes existing block bindings source.\n *\n * @param name Name of the source to remove.\n */\nexport function removeBlockBindingsSource( name: string ): Action {\n\treturn {\n\t\ttype: 'REMOVE_BLOCK_BINDINGS_SOURCE',\n\t\tname,\n\t};\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,gCAAiC;AAY1B,SAAS,yBACf,MACA,WACS;AACT,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AASO,SAAS,wBACf,MACA,WACC;AACD,SAAO,CAAE,EAAE,SAAS,MAA6B;AAChD,aAAU,EAAE,MAAM,8BAA8B,MAAM,UAAU,CAAE;AAClE,UAAM,qBAAqB;AAAA,UAC1B,4CAAkB,MAAM,SAAU;AAAA,IACnC;AACA,QAAK,CAAE,oBAAqB;AAC3B;AAAA,IACD;AACA,aAAS,cAAe,kBAAmB;AAAA,EAC5C;AACD;AAOO,SAAS,uBAAwB,QAAsC;AAC7E,SAAO;AAAA,IACN,MAAM;AAAA,IACN,MAAM,OAAO;AAAA,IACb,OAAO,OAAO;AAAA,IACd,aAAa,OAAO;AAAA,IACpB,WAAW,OAAO;AAAA,IAClB,WAAW,OAAO;AAAA,IAClB,kBAAkB,OAAO;AAAA,IACzB,eAAe,OAAO;AAAA,EACvB;AACD;AAOO,SAAS,0BAA2B,MAAuB;AACjE,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;",
  "names": []
}
