(()=>{"use strict";const e=window.React,{Panel:t,PanelBody:o,SelectControl:l}=wp.components,{InspectorControls:r}=wp.blockEditor,{withSelect:p}=wp.data,{compose:a}=wp.compose,n=a([p(e=>({docs:e("core").getEntityRecords("postType","ppt_viewer",{per_page:100})}))])(p=>{const{props:{attributes:a,setAttributes:n},docs:c}=p,{postName:s}=a;let d;return c&&(d=c.map(e=>({label:e?.title?.rendered,value:`[doc id=${e?.id}]`})),d=[{label:"Select",value:null},...d]),(0,e.createElement)(r,{style:{marginBottom:"40px"}},(0,e.createElement)(t,null,(0,e.createElement)(o,null,(0,e.createElement)(l,{label:"Size",value:s,options:d,onChange:e=>n({postName:e})}))))}),{Fragment:c}=wp.element,{withSelect:s}=wp.data,{compose:d}=wp.compose,i=d([s(e=>({docs:e("core").getEntityRecords("postType","ppt_viewer",{per_page:100})}))])(t=>{const{attributes:o,docs:l}=t,{postName:r}=o;let p,a="";return l&&(p=l.map(e=>(r===`[doc id=${e?.id}]`&&(a=e?.title?.rendered),{label:e?.title?.rendered,value:`[doc id=${e?.id}]`})),p=[{label:"Select",value:null},...p]),(0,e.createElement)(c,null,(0,e.createElement)(n,{props:t}),(0,e.createElement)("h3",{style:{background:"#fff",padding:"2px 10px"}}," ",!a&&"Select a document"," ",a))}),{__:m}=wp.i18n,{registerBlockType:u}=wp.blocks;u("kahf-kit/kahf-banner-k27f",{title:m("Documenter Embedder","ppv"),icon:"media-document",category:"common",keywords:[m("Documenter Embedder","ppv"),m("Document","ppv")],attributes:{postName:{type:"string",source:"html"}},parent:["lsdkf/lsdkfjlsd"],getEditWrapperProps:()=>{},edit:i,save:e=>{const{attributes:t}=e,{postName:o}=t;return o},example:{attributes:!0}})})();