(()=>{"use strict";const e=window.wp.blocks,c=JSON.parse('{"apiVersion":3,"name":"bch/code-parent","version":"1.1.3","title":"Code","category":"code","description":"Parent block to select and build code snippet templates.","keywords":["code","snippets","template"],"textdomain":"code-snippets-block","attributes":{"align":{"type":"string","default":""}},"supports":{"align":["wide","full"],"html":false,"inserter":false},"editorScript":"file:./index.js","editorStyle":"file:./index.css"}'),a=window.React,{useBlockProps:t}=wp.blockEditor,{dispatch:o}=wp.data;(0,e.registerBlockType)(c,{icon:"media-code",edit:e=>{const c=t(),{clientId:s}=e,n="undefined"!=typeof csbIsPipeChecker&&Boolean(csbIsPipeChecker);return(0,a.createElement)("div",{...c},(0,a.createElement)("div",{className:"pfb-portfolio-editor csb-snippets-editor"},(0,a.createElement)("h2",{className:"pfb-title csb-title"},"Choose a Code Snippet Template"),(0,a.createElement)("div",{className:"pfb-buttons csb-buttons"},[{name:"Code Highlight",block:"bch/code-highlight",icon:"📁",className:"default"},{name:"Code Tabs",block:"bch/code-tabs",icon:"🗂️",className:"tabs"},{name:"Terminal",block:"bch/terminal",icon:"💻",className:"terminal"},{name:"Remote Embed",block:"bch/remote-embed",icon:"🔗",className:"remote"},{name:"Code Steps",block:"bch/code-steps",icon:"🪜",className:"steps"},{name:"Code Diff",block:"bch/code-diff",icon:"🔄",className:"diff"},{name:"Playground",block:"bch/playground",icon:"🛝",className:"playground"},{name:"Diagram",block:"bch/diagram",icon:"📊",className:"diagram"},{name:"Snapshot",block:"bch/snapshot",icon:"📸",className:"snapshot"},{name:"API TryIt",block:"bch/api-tryit",icon:"🚀",className:"api"},{name:"Annotations",block:"bch/annotations",icon:"📝",className:"annotations"},{name:"Explain Code",block:"bch/explain",icon:"💡",className:"explain"},{name:"Python Interpreter",block:"bch/python",icon:"🐍",className:"python"},{name:"Screencast",block:"bch/screencast",icon:"🎥",className:"screencast"},{name:"JSON Viewer",block:"bch/json-viewer",icon:"🔍",className:"json"},{name:"Regex Tester",block:"bch/regex",icon:"🧪",className:"regex"},{name:"Spotlight",block:"bch/spotlight",icon:"🔦",className:"spotlight"}].map(e=>{return c=e.block,wp.blocks.getBlockType(c)?(0,a.createElement)("button",{key:e.block,className:`pfb-button csb-button ${e.className}`,onClick:()=>(e=>{const c=o("core/block-editor");c.updateSettings({templateLock:!1});const a=wp.blocks.createBlock(e);c.replaceBlock(s,a),setTimeout(()=>{c.updateSettings({templateLock:"all"})},100)})(e.block)},(0,a.createElement)("span",{className:"icon"},e.icon),(0,a.createElement)("span",{className:"text"},e.name),!n&&"bch/code-highlight"!==e.block&&(0,a.createElement)("span",{className:"proBadge"},"Pro")):null;var c}))))},save:()=>null})})();