(()=>{"use strict";const e=window.wp.blockEditor,t=window.wp.blocks,i=window.wp.i18n,s=JSON.parse('{"UU":"lumiere/main","L1":"embed","RE":["lumiere","imdb","movies","film"],"Fw":{"attributes":{"message":"This is a test"}}}'),l=window.wp.element,o=window.ReactJSXRuntime;const n=(0,o.jsx)("svg",{width:35,height:35,viewBox:"0 0 200 200",children:(0,o.jsx)("path",{d:"M10 100 c0 -47 4 -80 10 -80 6 0 10 33 10 80 0 47 -4 80 -10 80 -6 0 -10 -33 -10 -80zM50 170 c0 -5 23 -10 50 -10 28 0 50 5 50 10 0 6 -22 10 -50 10 -27 0 -50 -4 -50 -10zM170 100 c0 -47 4 -80 10 -80 6 0 10 33 10 80 0 47 -4 80 -10 80 -6 0 -10 -33 -10 -80zM50 110 c0 -29 1 -30 50 -30 49 0 50 1 50 30 0 29 -1 30 -50 30 -49 0 -50 -1 -50 -30zM50 35 c0 -11 12 -15 50 -15 38 0 50 4 50 15 0 11 -12 15 -50 15 -38 0 -50 -4 -50 -15z"})});(0,t.registerBlockType)(s.UU,{title:(0,i.__)("Add a movie or person into your post","lumiere-movies"),description:(0,i.__)("Add a block in your posts that displays movie/person data.","lumiere-movies"),icon:n,category:s.L1,keywords:s.RE,example:s.Fw,attributes:{lumiere_imdblt_select:{type:"string",default:"lum_movie_title"},content:{type:"string",default:(0,i.__)("Enter the name or the IMDb ID movie","lumiere-movies")}},edit:function(t){const s=(0,e.useBlockProps)();return(0,o.jsx)("div",{...s,children:(0,o.jsxs)("div",{className:"lumiere_block_intothepost",children:[(0,o.jsx)("img",{className:"lumiere_block_intothepost-image",src:lumiere_admin_vars.ico80,alt:""}),(0,o.jsx)("div",{className:"lumiere_block_intothepost-title",children:"Lumière! movies"}),(0,o.jsxs)("div",{className:"lumiere_block_intothepost-explanation",children:[(0,i.__)("This block is visible only in your admin area. In your blog frontpage, it will be replaced by the movie you selected here.","lumiere-movies"),(0,o.jsx)("br",{}),(0,i.__)('"By Movie title/Person name": Enter the title/name.',"lumiere-movies"),(0,o.jsx)("br",{}),(r=(0,i.sprintf)((0,i.__)("You can get the IMDb ID number by %1$ssearching in the popup%2$s and then copy the ID found here.","lumiere-movies"),'<a data-lumiere_admin_search_popup="noInfoNeeded" class="link-imdblt-highslidepeople" target="_blank">',"</a>"),(0,l.RawHTML)({children:r}))]}),(0,o.jsxs)("div",{className:"lumiere_block_intothepost-container",children:[(0,o.jsx)("div",{className:"lumiere_block_intothepost-select",children:(0,o.jsx)("select",{value:t.attributes.lumiere_imdblt_select,onChange:e=>{t.setAttributes({content:""}),t.setAttributes({lumiere_imdblt_select:e.target.value})},name:"movie_type_selection",children:(n=lumiere_admin_vars.select_type_search,n.map(e=>(0,o.jsx)("option",{value:e.value,children:e.label})))})}),(0,o.jsx)(e.RichText,{tagName:"div",className:"lumiere_block_intothepost-content",value:t.attributes.content,onChange:e=>t.setAttributes({content:e})})]})]})});var n,r},save:t=>{const i=e.useBlockProps.save();return(0,o.jsx)("div",{...i,children:(0,o.jsx)("span",{"data-lum_movie_maker":t.attributes.lumiere_imdblt_select,children:t.attributes.content})})}})})();