(()=>{"use strict";const e=window.wp.plugins,t=window.wp.editor,n=window.wp.components,i=window.wp.data,o=window.wp.coreData,p=window.ReactJSXRuntime,a=window.vbpEditor?.i18n||{};(0,e.registerPlugin)("vbp-init-pattern-panel",{render:()=>{const e=(0,i.useSelect)(e=>e("core/editor").getCurrentPostType(),[]),[l,s]=(0,o.useEntityProp)("postType",e,"meta");if("vk-block-patterns"!==e)return null;const d=l?.["vbp-init-post-type"]??"",r=l?.["vbp-init-pattern-add-method"]??"";let w="unspecified";d&&!r?w="show":r&&(w=r);const c=(e,t)=>{s({...l,[e]:t})},u=window.vbpEditor?.postTypes?Object.entries(window.vbpEditor.postTypes).map(([e,t])=>({label:t.label||e,value:e})):[],b=[{label:a.unspecified||"Unspecified",value:"unspecified"},{label:a.autoAdd||"Auto add",value:"add"},{label:a.showInCandidate||"Show in Candidate",value:"show"}];return(0,p.jsxs)(t.PluginDocumentSettingPanel,{name:"vbp-init-pattern",title:a.panelTitle||"Initial pattern setting",className:"vbp-init-pattern-panel",children:[(0,p.jsx)("p",{style:{fontSize:"12px",color:"#757575"},children:a.description||""}),(0,p.jsx)(n.SelectControl,{label:a.targetPostType||"Target Post Type.",value:d,options:u,onChange:e=>c("vbp-init-post-type",e)}),(0,p.jsx)(n.SelectControl,{label:a.howToAddPatterns||"How to Add Patterns.",value:w,options:b,onChange:e=>c("vbp-init-pattern-add-method",e)}),(0,p.jsx)("p",{style:{fontSize:"12px",color:"#757575"},children:a.multiplePatterns||""})]})}})})();